1. Jpeg files and Win32Lib

Hi All.  
I've been looking for a simple way of loading Jpeg's into a Win32Lib Windows
program.
So far I've looked at all the contributions under the search term 'jpg' and
'jpeg', but none of them really provides a sensible option.  ie they mainly are
convertors into BMP's on disk - not really a great idea for something that might
run from CD!!!

The CXImage DLL wrapper comes close to what my requirements are, but it does not
produce anything I can use with Win32Lib directly (ie a DIB in the same format
(and I thought DIB's were a Standard!!!!))

Has anyone (Mic!) enhanced that wrapper, or can anyone point me in the right
direction as how to get a 'DIB' in the form {pixels, width, height, bpp} into a
'DIB' that can be displayed using CopyBlt, DrawBitmap, etc ????

I don't really want to be doing an execute of another executable (a la Al Getz's
stuff), or using Tommy's Win32DIB (at the moment - though it's really, really
good and should be incorporated into win32lib IMHO ;) ), but would prefer to have
the simplicity of the cximage option - a single DLL, a simple wrapper and only a
couple of calls.

I'm sure I can't be alone in this request - nowadays Jpeg's are standard, as are
Png's, and BMP's are just cumbersome.  Let's get something that can work with
these standards.

Thanks in advance.

new topic     » topic index » view message » categorize

2. Re: Jpeg files and Win32Lib

Have a look at my "TSEuImageEditor", which uses FreeImage library to load jpegs.

In file TSLibrary_DraWwnd.ew in procedure set_image() image is loaded like this:

    Main_freeimage_image = fiLoadImage (filename)
    Main_bitmap = fiCreateDIB (Main_freeimage_image)

Main_bitmap is HBITMAP

I think HBITMAP can be created also with cximage library.

Dave Probert wrote:
> 
> Hi All.  
> I've been looking for a simple way of loading Jpeg's into a Win32Lib Windows
> program.
>  
> So far I've looked at all the contributions under the search term 'jpg' and
> 'jpeg',
> but none of them really provides a sensible option.  ie they mainly are
> convertors
> into BMP's on disk - not really a great idea for something that might run from
> CD!!!
> 
> The CXImage DLL wrapper comes close to what my requirements are, but it does
> not produce
> anything I can use with Win32Lib directly (ie a DIB in the same format (and I
> thought
> DIB's were a Standard!!!!))
> 
> Has anyone (Mic!) enhanced that wrapper, or can anyone point me in the right
> direction
> as how to get a 'DIB' in the form {pixels, width, height, bpp} into a 'DIB'
> that can
> be displayed using CopyBlt, DrawBitmap, etc ????
> 
> I don't really want to be doing an execute of another executable (a la Al
> Getz's stuff),
> or using Tommy's Win32DIB (at the moment - though it's really, really good and
> should
> be incorporated into win32lib IMHO ;) ), but would prefer to have the
> simplicity of
> the cximage option - a single DLL, a simple wrapper and only a couple of
> calls.
> 
> I'm sure I can't be alone in this request - nowadays Jpeg's are standard, as
> are Png's,
> and BMP's are just cumbersome.  Let's get something that can work with these
> standards.
> 
> Thanks in advance.
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Jpeg files and Win32Lib

Thanks Tone,

That seems to be more like what I'm looking for.  I'll test it out and see if it
works Ok under the program structure I'm using.

Cheers

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu