GFL New Source Conversion help. !! Working !!
GFL New Source Conversion help. !! Working !!
http://www.xnview.com
Is this the only freeware multi-format image loader/convertor/saver available or is there another, that supports more or less then 350 image formats?
I had an attempt at converting it, but I am no VB expert or any of the other languages it supports natively, like delphi, bcc, vc++ etc. the most I could port from the source code provided was a black image, I got all the other functions for infomation working, but when it comes to image display I am useless.
I can post my work if anyone wishes, to try futher.
[fustrated@self] - I don't know why PureBasic hasn't picked up this library already it would sovel imaging loading perminantly, and there wouldn't be any need for a plugin system like we have to day, because all formats are pretty much coverted, sure no one really needs 350 formats support out of those 350 only a few would be used maybe 10 or so, but it'd be nice. [/fustrated@self]
Is this the only freeware multi-format image loader/convertor/saver available or is there another, that supports more or less then 350 image formats?
I had an attempt at converting it, but I am no VB expert or any of the other languages it supports natively, like delphi, bcc, vc++ etc. the most I could port from the source code provided was a black image, I got all the other functions for infomation working, but when it comes to image display I am useless.
I can post my work if anyone wishes, to try futher.
[fustrated@self] - I don't know why PureBasic hasn't picked up this library already it would sovel imaging loading perminantly, and there wouldn't be any need for a plugin system like we have to day, because all formats are pretty much coverted, sure no one really needs 350 formats support out of those 350 only a few would be used maybe 10 or so, but it'd be nice. [/fustrated@self]
Last edited by Inner on Fri Jul 11, 2003 3:34 pm, edited 3 times in total.
I guess a reason for it not being used is that this program is not free for commercial use.. it costs 27$ for a 1 workstation lisense...
AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
Er.. I guess that standards for Development Image Library
--- ( I'm a Christian ) --- LOL . I'll take a look at it thanks Fred.
Just had a look, doesn't support nearly as many formats as xnview.
keep in mind that beating or being equal to 350+ formats is pretty hard tasks to challange.
That and I don't feel comfortable with the name.
Just had a look, doesn't support nearly as many formats as xnview.
That and I don't feel comfortable with the name.
Yes it is excellent but;
doesn't support 350 formats
doesn't have an SDK for developers as far as I know.
& would mean I'd have to use the RunProgram command, which is umm not an elagant way to implyment something.
[background]
I guess by now it would appear as thou I'm being picky, but cd databasing software needs a wide deepth of flexibilite to identify/display/convert & resize all sorts of media, the last email I want about my software is can you support x or y image format, worse still getting an email of abuse because I just added a format of some discription that wasn't there before, forcing an end user to recatalog an entire cd collection. [ yes the idea is to when scanning cd's to take thumb nails of ever image it comes accross, store that data, and recall it again without having to have the cd in the drive, if the bigger image is requested obviously the correct cd would have to be re-inserted. ] the converting part I heaverly cludged together with NConvert.exe and I dispise it entirely. because it slows the scanner down having to fire up a .exe just to perform a resize on a .neo image file, or any other format for that matter.
this is my current work : http://www.inet.net.nz/~tjr/irc/gfl-purebasic.rar
maybe someone could help with it. [ please ] pretty please, please with a cherry on top
doesn't support 350 formats
doesn't have an SDK for developers as far as I know.
& would mean I'd have to use the RunProgram command, which is umm not an elagant way to implyment something.
[background]
I guess by now it would appear as thou I'm being picky, but cd databasing software needs a wide deepth of flexibilite to identify/display/convert & resize all sorts of media, the last email I want about my software is can you support x or y image format, worse still getting an email of abuse because I just added a format of some discription that wasn't there before, forcing an end user to recatalog an entire cd collection. [ yes the idea is to when scanning cd's to take thumb nails of ever image it comes accross, store that data, and recall it again without having to have the cd in the drive, if the bigger image is requested obviously the correct cd would have to be re-inserted. ] the converting part I heaverly cludged together with NConvert.exe and I dispise it entirely. because it slows the scanner down having to fire up a .exe just to perform a resize on a .neo image file, or any other format for that matter.
this is my current work : http://www.inet.net.nz/~tjr/irc/gfl-purebasic.rar
maybe someone could help with it. [ please ] pretty please, please with a cherry on top
It comes down to this last few problems;
And this function;
I've no idea how to convert those, he is using strange symbols I've not see ever before in C, like ~,: And ?.
Code: Select all
static void GetDIBFromBitmap( GFL_BITMAP *bitmap, LPBITMAPINFOHEADER * pbitmap_info, unsigned char **data )
{
int i;
int j;
int bytes_per_line;
unsigned char *ptr_src;
unsigned char *ptr_dst;
LPBITMAPINFOHEADER bitmap_info;
RGBQUAD *colormap;
*data = NULL;
*pbitmap_info = NULL;
bitmap_info = *pbitmap_info = calloc( 1, sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD) );
colormap = (unsigned char *)bitmap_info + sizeof(BITMAPINFOHEADER);
bitmap_info->biSize = sizeof(BITMAPINFOHEADER);
bitmap_info->biWidth = bitmap->Width;
bitmap_info->biHeight = bitmap->Height;
bitmap_info->biPlanes = 1;
if ( bitmap->Type == GFL_BINARY )
{
bytes_per_line = ((bitmap->Width + 31) / 32) * 4;
bitmap_info->biClrUsed = 2;
bitmap_info->biBitCount = 1;
}
else
if ( bitmap->Type == GFL_GREY || bitmap->Type == GFL_COLORS )
{
bytes_per_line = (bitmap->Width + 3) & ~3;
bitmap_info->biClrUsed = 256;
bitmap_info->biBitCount = 8;
}
else
{
bytes_per_line = (bitmap->Width * 3 + 3) & ~3;
bitmap_info->biClrUsed = 0;
bitmap_info->biBitCount = 24;
}
bitmap_info->biCompression = BI_RGB;
bitmap_info->biSizeImage = bytes_per_line * bitmap->Height;
bitmap_info->biClrImportant = 0;
if ( bitmap_info->biClrUsed > 0 )
{
if ( bitmap->Type == GFL_BINARY )
{
colormap[0].rgbRed = 0;
colormap[0].rgbGreen = 0;
colormap[0].rgbBlue = 0;
colormap[0].rgbRed = 255;
colormap[0].rgbGreen = 255;
colormap[0].rgbBlue = 255;
}
else
if ( bitmap->Type == GFL_GREY )
{
for ( i=0; i<bitmap->ColorUsed; i++ )
{
colormap[i].rgbRed = (i * 255) / (bitmap->ColorUsed-1);
colormap[i].rgbGreen = colormap[i].rgbRed;
colormap[i].rgbBlue = colormap[i].rgbRed;
}
}
else
{
for ( i=0; i<bitmap->ColorUsed; i++ )
{
colormap[i].rgbRed = bitmap->ColorMap->Red[i];
colormap[i].rgbGreen = bitmap->ColorMap->Green[i];
colormap[i].rgbBlue = bitmap->ColorMap->Blue[i];
}
}
}
}
Code: Select all
StretchDIBits( hDC, 0, 0, TheBitmap->Width, TheBitmap->Height, 0, 0, TheBitmap->Width, TheBitmap->Height, dib_data ? dib_data : TheBitmap->Data, (BITMAPINFO *)dib_info, DIB_RGB_COLORS, SRCCOPY );
~ = one's complement (same in PB)
is equal to
Code: Select all
x ? a : b
Code: Select all
if x
a
else
b
endif
[:: PB Registered ::]
Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
New Source, and yes it doesn't work;
But it's closer
http://www.inet.net.nz/~tjr/irc/GFL_PB2.zip
includes the VB source
includes my pitaful atempt at porting it too.
But it kinda works if you like "Software Failure"
I feel completely useless, so anyone that whats to download the latest botch up, and mock me your more than welcome.
But it's closer
http://www.inet.net.nz/~tjr/irc/GFL_PB2.zip
includes the VB source
includes my pitaful atempt at porting it too.
But it kinda works if you like "Software Failure"
I feel completely useless, so anyone that whats to download the latest botch up, and mock me your more than welcome.
-
Doobrey
- Enthusiast

- Posts: 218
- Joined: Sat Apr 26, 2003 4:47 am
- Location: Dullsville..population: me
- Contact:
Don`t give up Inner, it`s all part of the learning process. Sometimes you can get stuck for ages on a bit of code, but then somehow it all comes together.Inner wrote: I feel completely useless, so anyone that whats to download the latest botch up, and mock me your more than welcome.
Porting code from a language you have little knowledge of is never easy but once you get to know the way it works it becomes a bit easier.
I tried writing a winamp plugin using PB last year..it kept crashing after 2 secs, so I gave up..until yesterday, spotted that a procedure in my DLL should have been a ProcedureCDLL instead of ProcedureDLL (no idea why Winamp mixes the 2 types in one plugin!) and it works. That one f#@$ing line took me 3 or 4 evenings of bugtracking to figure out
That'd be because ProcedureCDLL is a new resent command 
It's alot diferent trying to convert a programming language when the only comments in the source are french!, which makes it twice as hard because your going off purely code and only code.
The problem here is I know what I am doing, it's just not doing it.. the old and very worn out road of, "it doesn't work, it should work acording to logic"
It's alot diferent trying to convert a programming language when the only comments in the source are french!, which makes it twice as hard because your going off purely code and only code.
The problem here is I know what I am doing, it's just not doing it.. the old and very worn out road of, "it doesn't work, it should work acording to logic"


