Hi,

OK, it proved a little easier than I thought. All you need to do is apply this
patch to add three lines to the jpegicc.c file in the jpegicc directory:

@@ -446,8 +446,11 @@
     JSAMPROW ScanLineIn;
     JSAMPROW ScanLineOut;

-
-
+    //Preserve resolution values from the original
+    Compressor.density_unit=Decompressor.density_unit;
+    Compressor.X_density=Decompressor.X_density;
+    Compressor.Y_density=Decompressor.Y_density;
+
        jpeg_start_decompress(&Decompressor);
        jpeg_start_compress(&Compressor, TRUE);


This reads the resolution values from the Decompression object into the
Compression object, thus preserving them. Recompile jpegicc and you should be OK!

Sensibly, the code calls jpeg_copy_critical_parameters() to copy info from the
Decompresion to the Compression objects. Unfortunately this does not copy the
resolution information. (A bug? Feature?) It gets set to 72 dpi by default.
According to Bob, we are not the first people to get caught out by this...

This patch is based on lcms1-11. I have run it on a single test image under Free
BSD but I cannot see why it should not work everywhere.

Hope this helps!

Rob.


Quoting taa boo <[EMAIL PROTECTED]>:

> hi pro,
> 
> thank a lot for your reply!
> 
> I am in hanoi, vietnam , I was out-of-job last three
> months because of It economy downturn.
> 
> This is my new job and trial assignment and very
> important assignment for my job security
> 
> I have willing to pay u some money from my salary if u
> can help me to solve this problem .I am aware of your
> valuable time that problem could take.
> 
> Please let me know your advice! My requirement is just
> simple as keeping the resolution from RGB image to
> CMYK image 
> 
> Thank for your concern again and hope we have somehow
> cooperate.
> 
> 
> Dang Trong Hop
> --- robert bergs <[EMAIL PROTECTED]> wrote:
> > Hello,
> > 
> > I've just had a quick look through the source code &
> > it appears that the
> > resolution fields of the JPEG are not read / written
> > out again. I suspect the 72
> > you are getting is a default value.
> > 
> > In the JPEG library which jpegicc uses, there are
> > two structs of interest here.
> > They are jpeg_decompress_struct and
> > jpeg_compress_struct. In both of these, the
> > members X_density and Y_density specify the density,
> > and density_unit gives the
> > units (1 is pixels per inch, 2 is pixels per cm).
> > 
> > The code needs to be modified to save these values
> > from the decompression object
> > on read and copy them to the compression object on
> > write. I think this all
> > happens in jpegicc.c but I've only had a brief look
> > at the code.
> > 
> > Read the documentation in the JPEG-6b lib from
> > http://www.ijg.org. I might
> > submit a patch if I get time...
> > 
> > Rob.
> > 
> > 
> > Quoting taa boo <[EMAIL PROTECTED]>:
> > 
> > > Dear members,
> > > 
> > > I already try all the way to improve resolution of
> > my
> > > result CMYK image from a RGB image but failed
> > > 
> > > jpegicc -c0 -m0 -q85
> > >
> >
> -o"D:\WINNT\system32\spool\drivers\color\USWebCoatedSWOP.icc"
> > > 11.jpg myTooLowResolutionCMYK.jpg
> > > 
> > > I already try all parameters possibilities but
> > Adobe
> > > Photoshop always reports me a fixed value of
> > > resolution 72 in
> > > myTooLowResolutionCMYK.jpg
> > > 
> > > 11.jpg (RGB source) has much higher resolution 300
> > > 
> > > Any help is appreciated, 
> > > 
> > > Thank a lot , a lot for any reply because it is
> > quite
> > > URGENT and my boss is behind my shoulder :-((
> > > 
> > > Dang hop
> > > 
> > > __________________________________
> > > Do you Yahoo!?
> > > Find out what made the Top Yahoo! Searches of 2003
> > > http://search.yahoo.com/top2003
> > > 
> > > 
> > >
> >
> -------------------------------------------------------
> > > This SF.net email is sponsored by: IBM Linux
> > Tutorials.
> > > Become an expert in LINUX or just sharpen your
> > skills.  Sign up for IBM's
> > > Free Linux Tutorials.  Learn everything from the
> > bash shell to sys admin.
> > > Click now!
> >
> http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> > > _______________________________________________
> > > Lcms-user mailing list
> > > [EMAIL PROTECTED]
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/lcms-user
> > > 
> > 
> > 
> > -- 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 


-- 


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to