Need help with image conversion
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Need help with image conversion
I got a large collection of JPG images which are encoded as CMYK, instead of RGB. The problem, of course, is, that most software is just not capable of displaying them properly, much less convert them to something usable. Nearly every batch converter I throw at them totally screws up the colors, as do web browsers. But since I need these images for a web project I have to convert them. The only tool I found so far that can handle it properly is Paint.net, which cannot do batch conversions, so with several 100 images this simply does not work.
Does anyone know a tool that can do the conversion properly?
Does anyone know a tool that can do the conversion properly?
- Tormentor667
- Posts: 13533
- Joined: Wed Jul 16, 2003 3:52 am
- Contact:
Re: Need help with image conversion
I can do that batch-wise with Photoshop, just drop me a pm and I can do that on Sunday
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Need help with image conversion
Thanks for the offer, but I cannot do that. The images are not my property and if they find out that I gave them to someone else I'd be in trouble.
Re: Need help with image conversion
Have you tried throwing Ken's PNGOUT at them? It can be batch scripted.
If it can handle them you can of course just convert the resulting PNG's back to the RGB JPG format.
If it can handle them you can of course just convert the resulting PNG's back to the RGB JPG format.
- Kinsie
- Posts: 7399
- Joined: Fri Oct 22, 2004 9:22 am
- Graphics Processor: nVidia with Vulkan support
- Location: MAP33
- Contact:
Re: Need help with image conversion
CMYK can be difficult to handle due to colour profiles and other stuff that only professional designers care about. How does Imagemagick handle it? A quick Google threw me at a quick batch file to create RGB versions of CMYK JPEGs without trashing the originals.
Alternatively, an extremely un-scientific test using a screenshot of Photoshop's colour picker tells me that you might have luck with Irfanview.
Alternatively, an extremely un-scientific test using a screenshot of Photoshop's colour picker tells me that you might have luck with Irfanview.
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Need help with image conversion
Imagemagick is a free and pretty well respected toolset and looks to be able to do this properly with color profiles. This page is about going the other way (RBG > CMYK), but should be easy enough to reverse.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Need help with image conversion
ImageMagick's output of the images in question is too dark and too saturated - the same they look in all web browsers I checked.
Regarding color profiles, please don't ask me. I think the images got one embedded because Paint.net and IrfanView get them right when viewing, but I cannot get them converted with anything resembling those colors that can be run as batch job.
Regarding color profiles, please don't ask me. I think the images got one embedded because Paint.net and IrfanView get them right when viewing, but I cannot get them converted with anything resembling those colors that can be run as batch job.
Re: Need help with image conversion
Off topic but is CMYK the reason for some images I've seen to have totally different colors when viewed but then be much more bland when opened and resaved with something like MS Paint? I've also noticed for me that the images that do this also slow down Windows Photo Viewer to the point it causes screen tearing if you zoom in and out fast enough.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Need help with image conversion
I think that's color profiles in general. Some software simply does not read them.
- Tormentor667
- Posts: 13533
- Joined: Wed Jul 16, 2003 3:52 am
- Contact:
Re: Need help with image conversion
Well one suggestion I have is SageThumb, you might want to try that
Re: Need help with image conversion
If you manage to manually convert it from gimp, give me the step by step that you did and I'll try to make you na script for converting all those images.
EDIT: I did a quick test with gimp and it seems to be doing a good job:
on the .bat file there must be a folder called "CMYK" and "NEWCMYK", CMYK folder is where the original images are going to show and the other one is where the converted images are going to be stored in RGB.
And ignore this message "(gimp-console-2.8.exe:21116): LibGimpBase-WARNING **: gimp-console-2.8.exe: gimp_wire_read(): error"
Also, you must add the correct path for the gimp console, it may be just like mine but just in case...
EDIT: The output image is not 100% equal to the CMYK here, it's like 10% darker.
BUT some CMYK samples that I got were actually did a 100% convertion.
Idk if they are actually good neither bad since idk if the images that I see are actually correct or not.
EDIT: I did a quick test with gimp and it seems to be doing a good job:
Code: Select all
"C:\Program Files\GIMP 2\bin\gimp-console-2.8.exe" -b "(let* ( ( Files (cadr (file-glob \"CMYK\\*.*\" 1))) ) / (while (not (null? Files)) / (let* ( (file (car Files)) (image (car (gimp-file-load 1 file file))) (draw (car (gimp-image-get-active-layer image))) (savename (string-append (string-append \"New\" file) \".png\" ))) / (file-png-save-defaults 1 image draw savename savename) ) / (set! Files (cdr Files))))"
And ignore this message "(gimp-console-2.8.exe:21116): LibGimpBase-WARNING **: gimp-console-2.8.exe: gimp_wire_read(): error"
Also, you must add the correct path for the gimp console, it may be just like mine but just in case...
EDIT: The output image is not 100% equal to the CMYK here, it's like 10% darker.
BUT some CMYK samples that I got were actually did a 100% convertion.
Idk if they are actually good neither bad since idk if the images that I see are actually correct or not.
Re: Need help with image conversion
That's odd, because IrfanView does have a batch processing mode.Graf Zahl wrote:IrfanView get them right when viewing, but I cannot get them converted with anything resembling those colors that can be run as batch job.
Re: Need help with image conversion
Does IrfanView really work? Last time I tried it it ignored color profiles just like any other tool that can actually edit an image.
I don't understand this: Any pure image viewer can adjust an image to a given color profile for display - but what I cannot find is any tool that can apply the color profile to the actual image pixel data and save it back!
The only options I have seen is a) tools that just ignore the profile and save back a broken image or b) tools that just keep the profile in, deferring the problem to later.
The common excuse I read is "it's a lossy process". This can actually get a really nasty problem if the actual image data is needed in an environment that does not have color profiles, which is more common than some people think. Bad luck, if you have to work with people who believe that non-standard color profiles are a must and deliver unusable data...
I don't understand this: Any pure image viewer can adjust an image to a given color profile for display - but what I cannot find is any tool that can apply the color profile to the actual image pixel data and save it back!
The only options I have seen is a) tools that just ignore the profile and save back a broken image or b) tools that just keep the profile in, deferring the problem to later.
The common excuse I read is "it's a lossy process". This can actually get a really nasty problem if the actual image data is needed in an environment that does not have color profiles, which is more common than some people think. Bad luck, if you have to work with people who believe that non-standard color profiles are a must and deliver unusable data...
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Need help with image conversion
The state of things here is indeed pathetic. Even when dealing with RGB images it can be a hassle - take a JPG with a color profile and convert it to PNG: If you are lucky the profile gets embedded into the destination image, if not you got shit colors. Need a profile-less image or convert to BMP and you have no chance because all those stupid tools wouldn't dare making the adjustment on the pixel level and BMP does not support color profiles at all.