JPG colours saved via photoshop bug

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

Casper

JPG colours saved via photoshop bug

Post by Casper »

Hi,

I've recently noticed that if I have a PSD and save that file with saveAs as a JPG image the colours differ in most other jpg viewers. This said, reopen it with photoshop and it looks fine. It seems to alter the contrast in the image.

Do a 'save for web' and it looks fine in every other program. Only problem is that you can't do a 'save for web' via script.

So any ideas?

My client will just have to live with it otherwise as hand exporting 2000 images via save for web ain't an option.

Casper
Casper

JPG colours saved via photoshop bug

Post by Casper »

Also I'm using Photoshop CS, so I'm not sure if it's fixed in CS2?
Casper

JPG colours saved via photoshop bug

Post by Casper »

After playing around I've realised that in Photoshop CS and CS2 when you save a JPG from a PSD file in CMYK colour using saveAs then it will mess up the colours in every other program.

Thus I just needed to add a activeDocument.changeMode(ChangeMode.RGB) line to my script before saving. Easy.

In the process of figuring out that I realised how many typo's there are and how badly written the reference guides are!
Andrew

JPG colours saved via photoshop bug

Post by Andrew »

Hi Casper

Photoshop will display your image according to the color management preference settings you choose. Of particular importance is

1. The choice of 'Working Space' eg Adobe RGB, and, of 'Color Management Policy' eg Convert to Working Space or Preserve Embedded Profile.

2. The embedded profile (or lack thereof) of the image.

Many non-Photoshop applications, in particular web browsers, will view all images as if they were in sRGB. If they are not originally in sRGB then these images are likely to look very different in Photoshop than how they appear in the browser. The 'Save for Web' function in Photoshop recognizes this by converting the image to the sRGB color space, hence the resulting image looks the same inside and outside Photoshop.

Here are a couple of useful links on the subject:

http://www.computer-darkroom.com/ps8_colour/ps8_1.htm

http://www.drycreekphoto.com/Learn/color_management.htm

Andrew