Imagecache will save and recompress files even if the actions didn't really change anything - i.e. a scale action didn't run because the size was right to begin with.

I created an ImageAPI issue that would indicate if the action changed the image in any way:

#737006: Add an 'UNCHANGED' return code for actions

And this is the Imagecache counterpart, detecting the IMAGEAPI_UNCHANGED value, and just copying the file if no changes were made. It requires the above patch to ImageAPI.

CommentFileSizeAuthor
#1 imagecache.patch2.66 KBdrifter

Comments

drifter’s picture

StatusFileSize
new2.66 KB

Hmm, file didn't attach.

drifter’s picture

Status: Needs review » Closed (won't fix)

The related issue won't be fixed, so this one won't either.

grendzy’s picture

Title: Detect unchanged files and don't recompress » Detect unchanged image files and don't recompress
Project: ImageCache » Drupal core
Version: 6.x-2.x-dev » 8.x-dev
Component: Code » image.module
Status: Closed (won't fix) » Active

Now that imagecache is in core I'd like to re-evaluate this.

claudiu.cristea’s picture

Status: Active » Closed (won't fix)

#737006: Add an 'UNCHANGED' return code for actions is closed with "won't fix". This is obsolete too.

Feel free to reopen if you think I'm wrong.