Skip to main content
Participant
June 3, 2019
Answered

Automated lossless change of jpeg pictures

  • June 3, 2019
  • 5 replies
  • 858 views

Hi,

My company need to do automated lossless changes of multiple jpg images. In this case masking/replacing the the 2 bottom chunk rows of the image with black.

We prefer to do this with a c# api, but can use any other language if the performance is good enough.

Is this possible with photoshop or one of adobes other programs?

This topic has been closed for replies.
Correct answer Test Screen Name

Photoshop is not a possible option at all if you want this to be lossless. So no Adobe product meets your stated requirement.

5 replies

Legend
June 3, 2019

How would you script lossless change to JPEG samples (which must not decompress and recompress, by definition)?

Legend
June 3, 2019

Actually this CAN be scripted but I would recommend something like ImageMagick as much more suited.

Legend
June 3, 2019

No, Adobe offer no API to manipulate the raw DCT-encoded (JPEG) data in JPEG files. Apps either decompress (e.g. Photoshop) or work with images as compressed streams (e.g. Acrobat).

Test Screen NameCorrect answer
Legend
June 3, 2019

Photoshop is not a possible option at all if you want this to be lossless. So no Adobe product meets your stated requirement.

Legend
June 3, 2019

Lossless changes are THEORETICALLY possible only on entire 8x8 cells. So you could (in theory) losslessly black out the last two rows if there are 82 rows, but not if there are 81 or 83 rows. Whether you would find such a specialist tool is another question. Certainly Photoshop has no functions to losslessly transform JPEG files.

Participant
June 3, 2019

Do you know if photoshop is the only possible option for this in the adobe suite?

davescm
Community Expert
Community Expert
June 3, 2019

An image editing application will open and decompress a jpeg file. Then after your alterations will compress again. Every time the decompress/recompress is lossy.

As Test Screen Name mentions - what you want to do is theoretically possible by working on the jpeg contents directly without decompressing but an image editor is not going to do that for you.

Dave