🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.graphics.algorithms
Article #30

Re: IJG JPEG Engine and Win32

#30
From: Jumpstile Turner
Date: Mon, 08 Jan 1996 18:29
52 lines
2823 bytes
In article <TGL.96Jan8083559@netcom23.netcom.com>, tgl@netcom.com said:
>
>fortunat@interpath.com (Jumpstile Turner) writes:
>> Checking the cinfo structure after it comes 
>> back from jpeg_read_header shows that cinfo.image_width and 
>> cinfo.image_height are correct, however almost every field with  
>> "output_xxxx" is way off, either 1, 0, or some rediculous number 
>> like 7988774.
>
>Then you've still got a problem with sizeof(boolean), I'd bet,
>or else a structure packing rule (#pragma pack).  Are you sure
>you recompiled everything affected by the header files you changed?
>
>It might help to #include jpeglib.h *before* including any Windows-
>specific headers... if one of their headers is leaving #pragma pack
>in a nondefault state, that could cause this problem.
>
>                        regards, tom lane
>                        organizer, Independent JPEG Group


   Well, I've got it working flawlessly now. :) In fact the problem was 
entirely related to one specific Borland compiler setting.  Allocate 
enums as int.  This was causing all sorts of problems.  I had to have 
this set or borland packs enums.  I was looking for the word 
"structure"and I didn't pay much attention to this setting.  Like I 
figured, it was something stupid on my end.
   Incidently, I changed (and have been changing) a lot of stuff over 
to Win32 API calls, memory and file handling.  It sure seems a lot 
faster now as opposed to using the standard C stuff, but this might be 
my imagination.  Maybe I'll add multi-threading now that I have a 
handle on this thing. :)


   Thanks for all the help.  You really cleared up a lot of things for 
me and I learned a LOT (About the JPEG code too. :) )

             -Scott  


P.S.   If anyone reading this thread is interested in my hacked up 
version of the .LIB let me know.  I've been using it on hundreds of 
images now to make sure there are no strange memory leaks and it hasn't 
burped even once.



------------------------------------------------
Jumpstile Turner
fortunat@interpath.com
"Sing the Hare Hare, Dance the Hoochie Koo..."
------------------------------------------------
Technical Details
Message-ID: <4crnpl$k49@redstone.interpath.net>
Path: arc1-ca.pugleaf.net!redstone.interpath.net!usenet
References: <4cemir$6vb@redstone.interpath.net> <TGL.96Jan3202549@netcom21.netcom.com> <TGL.96Jan8083559@netcom23.netcom.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!redstone.interpath.net!usenet
From: fortunat@interpath.com (Jumpstile Turner)
Newsgroups: comp.graphics.algorithms,comp.lang.c++,comp.os.ms-windows.programmer.graphics,comp.os.ms-windows.programmer.multimedia,comp.os.ms-windows.programmer.win32
Subject: Re: IJG JPEG Engine and Win32
Date: 8 Jan 1996 18:29:09 GMT
Organization: Completely unorganized
Message-ID: <4crnpl$k49@redstone.interpath.net>
References: <4cemir$6vb@redstone.interpath.net> <TGL.96Jan3202549@netcom21.netcom.com> <TGL.96Jan8083559@netcom23.netcom.com>
NNTP-Posting-Host: fortunat.pdial.interpath.net
X-Newsreader: WinVN 0.99.7