• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Image CFC Help

New Here ,
Apr 30, 2007 Apr 30, 2007

Copy link to clipboard

Copied

Has anyone ever worked with image.cfc component? I m trying to use it for creating thumbnails but cant work around it. Please share your code or experience if anyone has ever used it. The code I have used is as below:

<cfset myfilepath= getDirectoryFromPath( getTemplatePath() ) >
<cffile action="upload"
filefield="imgfile"
destination="#myfilepath#Images"
nameconflict="overwrite">
<cfset uploadedImage = cffile.serverfile>
<!--- Invoke image.cfc component --->
<cfset imageCFC = createObject("component","image") />

<!--- scaleX image to 150px wide --->
<cfset scaleX150 = imageCFC.scaleX("", "#myfilepath#\Images\#uploadedImage#", "#myfilepath#\Images\_scaleX_150_#uploadedImage#", 150)>

Its giving me error "The method 'scaleX' could not be found in component ". I have never used components in the past. Please tell me what should I do to use this component. If someone has code showing how it has been used for creating thumbnails purpose will be very appreciated.

Thank you
TOPICS
Advanced techniques

Views

212

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 30, 2007 Apr 30, 2007

Copy link to clipboard

Copied

take a look at this application http://www.bellavite.de/tech/coldfusion/bellaalbum/ it contains all what you need about images.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

don't know which version of imagecfc you are using, but in the latest
one the methods are scaleHeight() and scaleWidth(), not scaleX() and
scaleY()...

full imagecfc docs are here:
http://www.opensourcecf.com/imagecfc/docs/imageCFC.cfm
--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

LATEST
Thank you Azadi. You are right Scale Width() did work :)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation