Search the web
Sign In
New User? Sign Up
speckcms · Speck CMS
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Using Images   Message List  
Reply | Forward Message #777 of 830 |
Re: [speckcms] Using Images

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



Wed Jul 8, 2009 5:15 pm

markthickpaddy
Offline Offline
Send Email Send Email

Forward
Message #777 of 830 |
Expand Messages Author Sort by Date

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...
gspearson69
Offline Send Email
Jul 8, 2009
4:10 pm

Hi Graham, ... 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...
Mark Woods
markthickpaddy
Offline Send Email
Jul 8, 2009
5:16 pm

When I use the Asset as the type for the cf_spProperty where I would like to give the individual the ability to select a photo, I get a Number stored in that...
gspearson69
Offline Send Email
Jul 9, 2009
5:47 pm

... If you use the Asset as the type when calling cf_spProperty, you should see a number stored in the database. This is the revision number of the containing...
Mark Woods
markthickpaddy
Offline Send Email
Jul 10, 2009
7:32 am

Mark, After performing an API update the Assets and Picker are entering the information into the database as you mentioned in the message. Now I think I have...
gspearson69
Offline Send Email
Jul 14, 2009
12:51 pm

Hi Graham, ... When you save changes in the add image window, the id of the new image should be appended to the list of picked ids in the opener window, then ...
Mark Woods
markthickpaddy
Offline Send Email
Jul 14, 2009
2:10 pm

Adter I sent the message, I was able to add cfdump code to resolve the issue and looking over some SVN Repository changes also helped in this. Now I think my...
gspearson69
Offline Send Email
Jul 14, 2009
2:22 pm

Well On Windows 2000 Professional with CF7 MultiServer with a computer that has IE8 installed, if I was to upload a picture I get a Red X. Now if I move to...
gspearson69
Offline Send Email
Jul 14, 2009
2:28 pm

... It sounds like it's just an IE8 issue, but it's only affecting the copy of IE8 on the win2K machine, not your other copy. Could you check the security...
Mark Woods
markthickpaddy
Offline Send Email
Jul 14, 2009
3:16 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help