Hello Carsten,

"Carsten Neumann" <carsten_neum...@gmx.net> schrieb im 
Newsbeitrag news:4e5ff506.5030...@gmx.net...
>
> hmm, perhaps I'm misreading your message, but to me it sounds as if you
> are not certain if the proposed change fixes your problem. Have you
> tried it, does it make a difference?
>
I did try it and it works for me, but I'm by no means familiar with the 
details of the jpeg library.

>
> hmm, reading a bit more in libjpeg.doc it seems that X_density,
> Y_density are considered compression parameters that are set to default
> values by jpeg_set_defaults(), so those two assignments should move
> after the call, the rest should (must, in case of cinfo.in_color_space)
> remain before the call.
> You seem to be set up to actually test this, would you be able to just
> move the X_density, Y_density assignment down and see if that fixes your
> problem?
>
The only change I did perform was to move the following lines down after
the jpeg_set_defaults(&cinfo); call.

      cinfo.density_unit = 1;  // dpi
      cinfo.X_density = UInt16(pImage->getResX()<  0.0f ?
                               pImage->getResX() - 0.5f :
                               pImage->getResX() + 0.5f);
      cinfo.Y_density = UInt16(pImage->getResY()<  0.0f ?
                               pImage->getResY() - 0.5f :
                               pImage->getResY() + 0.5f);


So, do you mean that the
cinfo.density_unit = 1;  // dpi
line should not be moved?

Best,
Johannes




------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to