Need help with image conversion

If it's not ZDoom, it goes here.
Post Reply
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Need help with image conversion

Post by Graf Zahl »

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?
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: Need help with image conversion

Post by Tormentor667 »

I can do that batch-wise with Photoshop, just drop me a pm and I can do that on Sunday
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Need help with image conversion

Post by Graf Zahl »

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.
User avatar
Rachael
Posts: 13558
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Need help with image conversion

Post by Rachael »

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.
User avatar
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

Post by Kinsie »

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.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Need help with image conversion

Post by Caligari87 »

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.

8-)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Need help with image conversion

Post by Graf Zahl »

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.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Need help with image conversion

Post by Nevander »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Need help with image conversion

Post by Graf Zahl »

I think that's color profiles in general. Some software simply does not read them.
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: Need help with image conversion

Post by Tormentor667 »

Well one suggestion I have is SageThumb, you might want to try that
User avatar
ibm5155
Posts: 1268
Joined: Wed Jul 20, 2011 4:24 pm
Contact:

Re: Need help with image conversion

Post by ibm5155 »

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:

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))))"
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.
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Need help with image conversion

Post by Gez »

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.
That's odd, because IrfanView does have a batch processing mode.
Kotti
Posts: 86
Joined: Tue Dec 27, 2016 4:08 am

Re: Need help with image conversion

Post by Kotti »

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... :(
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Need help with image conversion

Post by Graf Zahl »

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.
Post Reply

Return to “Off-Topic”