Hi Graham,
> For the first time since I have been using speck I am in need to working
> with images for a staff directory. I am looking at the code of the
> content type of Image.cfm. Since the photos which are taken from a
> digital camera are 3456 x 2304 I am wanting to resize the picture within
> the contentPut handler method.
You shouldn't need to resize within the contentPut method - the asset
property will automagically resize images for you if you tell it what
the maximum allowed dimensions are (it'll even do fancy stuff maintain
aspect ratios and crop images to fit). The various image manipulation
related attributes of the asset property type are documented here...
http://www.speckcms.org/documentation/building_apps/builtin_property_types
I'm not sure how old your version of Speck is, but recent versions of
the Image content type have configurable values for the maxWidth
attribute of both the original and thumbnail properties (defaults are
600 and 100 respectively). You can override these default by created a
types.cfg file inside the config directory for the application, with an
image section and two settings, original_max_width and
thumbnail_max_width, e.g.
[image]
original_max_width = 800
thumbnail_max_width = 150
If you have a look at the latest version of the Image content type, you
can see how Speck gets these settings using the getConfigString()
function. BTW, the latest version of the portal demo app has some
example config files with commented out settings representing default
values.
Regards
Mark