Reply to topic
CFX_IMG Tag
ssandlin


Joined: 06 Jul 2006
Posts: 1
Reply with quote
Twisted Evil

I am new to linux server, several sites on MS Servers, Crying or Very sad .

I am having to use the CFX_IMG custom tag to simply resize images to fixed width and height.

I have downloaded docs for tag and they don't make a lot of sense.
For one thing, the docs show the tag as CF_IMG.

Can anyone give me some code on how this tag is structured.

When I use the code as shown, I get an error saying that it can't read image.

mydomain equals my dns name, I'm not using "mydomain" there.

<CF_IMG file="/vservers/mydomain/htdocs/photos/ap/pix/123mainstreet.jpg">
<CF_IMG_RESIZE width="640" height="480" type="IMAGE"/>
<CF_IMG_SAVE file="/vservers/mydomain/htdocs/photos/ap/pix/123mainstreetsmall.jpg"/>
</CF_IMG>

any other coding throws BIG errors.

Any help on this would be great. Smile
Tobben


Joined: 06 Apr 2004
Posts: 3
Reply with quote
Have you checked your access rights on the Linux server. Probably it needs the read and the execute accss rights. Also you can try to save to another file (another name) than the oiginal file.
CF_IMG (CFX_IMG Tag)
Tobben


Joined: 06 Apr 2004
Posts: 3
Reply with quote
Hi!

This code works for me. #form.strl#" is the pixel size, and the image is scaled to this. Hope this will help you!

Torbjørn, Norway Very Happy


<cfset imagepath="#LCASE(SESSION.KLUBB_STI_ABS)#/uploads/nyheter">

<CFFILE ACTION="Upload"
FILEFIELD="photo"
DESTINATION="#LCase(SESSION.KLUBB_STI_ABS)#/uploads/nyheter/"
ACCEPT="image/*"
NAMECONFLICT="MakeUnique">


<img src="/scala/uploads/nyheter/#File.ServerFile#">
<cf_img file="#imagepath#/#File.ServerFile#">
<cf_img_resize scalebywidth="#form.strl#" type="image" >

<cf_img_save format="JPG" file="#imagepath#/Thumb_#File.ServerFile#">
</cf_img>
CF_IMG (CFX_IMG Tag)
Tobben


Joined: 06 Apr 2004
Posts: 3
Reply with quote
Hi!

This code works for me. #form.strl#" is the pixel size, and the image is scaled to this. Hope this will help you!

Torbjørn, Norway Very Happy


<cfset imagepath="#LCASE(SESSION.KLUBB_STI_ABS)#/uploads/nyheter">

<CFFILE ACTION="Upload"
FILEFIELD="photo"
DESTINATION="#LCase(SESSION.KLUBB_STI_ABS)#/uploads/nyheter/"
ACCEPT="image/*"
NAMECONFLICT="MakeUnique">


<img src="/scala/uploads/nyheter/#File.ServerFile#">
<cf_img file="#imagepath#/#File.ServerFile#">
<cf_img_resize scalebywidth="#form.strl#" type="image" >

<cf_img_save format="JPG" file="#imagepath#/Thumb_#File.ServerFile#">
</cf_img>
jstone


Joined: 31 Aug 2004
Posts: 32
Reply with quote
I have had some trouble with the CFX_Image tag also... Try this code and see if it works

<!---Get image and resize it--->

<CFX_image action="resize" file="#Application.ImagePath##serverFile#" x="247" y="137" output=#ImagePath#>


Also what is the exact error message you are getting.. using the above code or the code you displayed
CFX_IMG Tag
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic