🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.graphics.algorithms
Article #19

Re: IJG JPEG Engine and Win32

#19
From: Mike McCammant
Date: Thu, 04 Jan 1996 03:09
68 lines
3382 bytes
In article <4cemir$6vb@redstone.interpath.net>,
Jumpstile Turner <fortunat@interpath.com> wrote:
>  Hi all.  Has anyone successfully compiled and linked the IJG JPEG engine 
>with a Win32 compiler?  I can compile it fine and the resulting LIB file works 
>great when linking it into the included test applications; however, if I try 
>to link it with my GUI apps I get some really odd errors.   It links fine but 
>doesn't work! I'm using Borland C++ 4.52 (maybe this is my problem. (-: )    
>Basically stepping through with the debugger there is an assignment statement 
>in one of the modules that just doesn't do anything.  I mean nothing.  If I do 
>the assignment by hand with the debugger it works.  For example, the 
>assignment is as follows:
>
> cinfo->output_width = cinfo->image_width;
>
>cinfo->output_width is 0 and cinfo->image_width is say 289.  After the above 
>assignment nothing changes.   I'm far from a c++ expert and I've never 
>encountered something like this before.  If someone has compiled this lib 
>under Win32 I'd appreciate it if they could mail it my way.  I'd like to see 
>if its my compiler settings or just my ignorance. ;)   The big problem I can't 
>figure is that the compiled lib works fine linked with the test programs.  I 
>tried copying the code from the examples line for line but it just won't work 
>under the GUI.

I also have the libs "working", compiled under VC++ 2.2.  There are some 
weird problems, mainly with the cinfo variables not tracking right.  It is
probably something dumb on my part.  I had a problem with:

if( cinfo.next_scanline < cinfo.image_height) {
   blah blah...;
   jpeg_write_scanlines(blah);
   }

cinfo.next_scanline stays at 0.  I fixed this by adding a tracking
uint variable scanline into the loop and compared it to cinfo.image_height.

scanline = 0;

while( (cinfo.next_scanline < cinfo.image_height) &&
       ((unsigned int) scanline < cinfo.image_height) ) {
   blah blah...;
   jpeg_write_scanlines(blah);
   scanline++;
   }

Although this did not fix the lib, it did get my project going.

It seems that the cinfo variables do not auto-increment at all.

I was going to compile/link project with all the modules directly
instead of using a static lib, that way I could debug it all
easier.  Well, too much code, too little time.  Plus the project
was working so why?  ;)

If you do figure out what it is, I would like to fix my libs too.







	

-- 
Mike - mikemc@macshack.com  -  Home of the JEO-Counter, graphic WWW counter
 /---------------------------------------\   My opinions belong to me, 
| Visit us at http://www.macshack.com     |  myself and I, not my employer,
 \......................................./   the government or my wife...:)
Technical Details
Message-ID: <4cfgdg$mhl@macshack.com>
Path: arc1-ca.pugleaf.net!macshack.com!not-for-mail
References: <4cemir$6vb@redstone.interpath.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!macshack.com!not-for-mail
From: mikemc@macshack.com (Mike McCammant)
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: 3 Jan 1996 22:09:36 -0500
Organization: Mac's Shack - The "Whole Family" Internet Solution c/o macshack@randomc.com
Message-ID: <4cfgdg$mhl@macshack.com>
References: <4cemir$6vb@redstone.interpath.net>
Reply-To: mikemc@macshack.com
NNTP-Posting-Host: localhost.macshack.com