![]() |
| CFX_IMG Tag |
|
ssandlin
|
I am new to linux server, several sites on MS Servers, 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. |
||||||||||||
|
|
|||||||||||||
|
Tobben
|
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
|
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 <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
|
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 <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
|
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 |
|
||
|


