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

croping and scaling

LEGEND ,
May 10, 2007 May 10, 2007

Copy link to clipboard

Copied

I have a website where a user enter a customize of the graphic they want...
then I show them the picture with a highlight of the size they select

example: customize size: 20 x 20
show them a picture with a 20 x 20 box over the actual images.
but the user now wants to scale the image (while still keeping the 20 x 20
size) wants to


the website this is on right now is build in PHP.. and I'm wondering if I
can just point out to a cf page that will allow the cropping/scaling and
then go back to PHP with the data?

if someone knows how to do this; I'm will to pay to get it


TOPICS
Advanced techniques

Views

373

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 10, 2007 May 10, 2007

Copy link to clipboard

Copied

currently available cf versions do not have built-in image manipulation
support. you can do it, but you need to either use external tools or go
into Java classes. the upcoming CF8 will have a <cfimage> tag that will
allow image manipulation.

since your site is built with php, i suggest you search for available
php solutions - there are plenty out there, many free.

--
Azadi Saryev
Sabai-dee.com
Vientiane, Laos
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
Guest
May 14, 2007 May 14, 2007

Copy link to clipboard

Copied

I use imageMagick ( http://www.imagemagick.org) for creating thumbnails and resizing images. It's free and can handle a fair amount of image formats

for example, to resize an image I would do the following,

first, create a .bat file, createResized.bat:
convert.exe %1 -resize 800x800 %2

then, in your code
<cfset string1 = '/C C:\whatever\createResized.bat "#vNewFileName#" "#vNewFileNameResized#"'>
<cfexecute name="cmd" arguments="#string1#" timeout="180"></cfexecute>

this is how I would resize something to not be greater than 800 pixels in any direction for example







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
Guest
May 14, 2007 May 14, 2007

Copy link to clipboard

Copied

I can't remember why I use .bat files instead of just calling the executable directly. It was a long time ago that I wrote this and I remember I ran into some kind of trouble, but perhaps that was just due to inexperience at the time.

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 14, 2007 May 14, 2007

Copy link to clipboard

Copied

i use imageCFC from opensourcecf.com. a great little thing that does not
require any extra dll's to be installed and can perform lots of tricks...
check it out at:
http://www.opensourcecf.com/imagecfc/
--

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
Guest
May 14, 2007 May 14, 2007

Copy link to clipboard

Copied

LATEST
ImageMagick is a better solution for a PHP site - it is the image utility used by mediawiki (the backend software of wikipedia) and countless other PHP packages. It seems pointless to point a PHP page to a coldfusion site just for image resizing.

If you have a coldfusion site, and imageCFC supports the formats and features you want, then it probably is the best option in terms of integrating neatly into your code.

If the feature set / format support of imageCFC is not sufficient for what you're doing (as it wasn't for me), then calling ImageMagick from Coldfusion can also be achieved relatively easy, and it is a very mature and feature rich set of tools.

Just to be clear, ImageMagick doesn't require installation / DLLs. - the executable files just need to be somewhere the Coldfusion server can do a CFEXECUTE on them and it has support under linux as well.

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