Rendition from GIF to JPEG fails

Razuna 1.9.1, self hosted.

Hi all,

we have a rendition template that creates a JPEG image that is identical to the original image. When the original image is a GIF image, the rendition fails.

There is an image with a slightly different filename (without the -0 before the .jpg) in the folder.

Is this a bug?

Thanks in advance


I would need to look further into this. Please send the Gif file to and we will look into this.

Though, please keep in mind that our support volume is quite high at the moment and it might take several days to get back to you.

Thanks for your replay. I will send you the gif, but I think the problem is not the gif, it is a bug in handling the temporary filenames in the images.cfc. The JPEG is generated and named 705623_something.jpg. Later the images.cfc is searching for a file 705623_something -0 .jpg instead of 705623_something.jpg.

If you face the same problem, here is our solution/workaround.

The bug is in this section of images.cfc:

<!--- Remove -0 from the Converted filename only for GIF files --->
<cfif arguments.thestruct.qry_detail.thumb_extension EQ 'gif' AND theformat NEQ 'gif' AND theformat NEQ 'tif'>
  <cffile action="rename" source="#thisfolder#/#arguments.thestruct.thenamenoext#-0.#theformat#" destination= "#thisfolder#/#arguments.thestruct.thenamenoext#.#theformat#" />

Because of the if statement, the rename exception occurs when the file doesn’t has the ending -0.jpg.

We added this code to the if statement:

AND fileexists("#thisfolder#/#arguments.thestruct.thenamenoext#-0.#theformat#")

Now the rendition is generated independent of the filename of the jpeg filename.

Yeah, that fixes it. Thank you.