The amazing adventures of Doug Hughes

At long last Ive released an update to the Alagad Image Component. This release includes roughly 6 months of assorted bug fixes and a few new features.

Of particular note are the following updates:

The Image.cfc file can now be renamed to whatever you want. Ive found that many people, especially non-English speakers want to rename the CFC. Now this is possible.

The Image Component used to require that any image read with the readImage() method had the correct file extension. Unfortunately, thats hard to guarantee. Now, you can pass in the type of file through a new, optional, third argument on the readImage() method. So, for example, you could pass in the mime subtype that ColdFusion returns when users upload files.

The Image Component now has two methods for reading and writing raw binary data: readFromBinary() and writeToBinary(). These are useful for people who store image data in databases or may already have binary data in a variable and who want to use the Image Component without first writing the data to disk. (These two new methods bring the count of image manipulation functions on the Image Component over 100.)

Lastly, support for BlueDragon 6.1 has been removed. The Image Component continues to support BlueDragon 6.2 and, now, 6.2.1 too.

The Image Component can be downloaded from

Comments on: "Alagad Image Component Updated" (6)

  1. Erki Esken said:

    Can you also add image type autodetection to readimage(). It should be possible to read a few bytes and determine what type of image it is. Sometimes people upload images with no extension at all, and program doesn’t know what type to explicitly pass to readimage().


  2. Erki Esken…

    he said right in the post: “So, for example, you could pass in the mime subtype that ColdFusion returns when users upload files.”


  3. Erki Esken said:

    That doesn’t help always. Upload might have been separate step, or you could get images from another batch job or even PHP. I’m just saying image type detection shouldn’t be that hard, and would be a nice addition.


  4. Doug Hughes said:

    Erki – type detection is an important feature. It should have been implemented a long time ago. It actually should already work, but it doesn’t. That third argument on readImage is a work arround for those who need something good enough right now.


  5. Jonathan Rowny said:

    I love the Alagad Image component. Thank you Doug.


  6. Jonathan Jacobs said:

    I would prefer automatic detection as well. Often if the image’s file extension is wrong, the MIME typs is misidentified. A JPG file without a file extension (common in the mac world) is thought to be a application/octet-stream. There is little to go on at this point to guess that this is a JPG and not a TIFF or other format. Sometimes if the extension is WBM instead of WBMP, you can guess and pass the “wbmp” as the type. But more often you seem to need to ask that the filename be corrected and uploaded again. This is the only shortcoming I have found in this very handy component.


Comments are closed.

Tag Cloud

%d bloggers like this: