Hello Johannes,

On 09/02/2011 04:28 PM, Johannes Brunen wrote:
> "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,

ok, just wanted to make sure.

> 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?

no, sorry, I misread your message and thought you had moved the whole 
block of assignments including cinfo.in_color_space.
I've applied your suggested fix. Thanks for the report and fix and sorry 
again for the confusion.

        Cheers,
                Carsten

------------------------------------------------------------------------------
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