Resize images without saving anywhere in the server

New Here ,
Mar 08, 2017 Mar 08, 2017

Copy link to clipboard

Copied

Is there a way in ColdFusion to resize images to a specific size and show them in browser, without a need to store the resized images in folder. So the concept is only storing the original image file and show the other (resized) images without storing any where in the server.

Any help!!

Views

475

Likes

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

correct answers 1 Correct Answer

Advocate , Mar 08, 2017 Mar 08, 2017
Have a look at the cfimage documentation - ColdFusion Help | cfimageIf gives an exact example of what you need.
writeToBrowser action Use the writeToBrowseraction to display one or more ColdFusion images directly to the browser without writing them to files. Images are displayed in PNG format. The following example shows how to reduce the size of an image and display it in the browser:
<!--- This example shows how to create a ColdFusion image from a JPEG file, resize it, and then display it in the...

Likes

Translate

Translate
Advocate ,
Mar 08, 2017 Mar 08, 2017

Copy link to clipboard

Copied

Have a look at the cfimage documentation - ColdFusion Help | cfimage

If gives an exact example of what you need.

writeToBrowser action Use the writeToBrowseraction to display one or more ColdFusion images directly to the browser without writing them to files. Images are displayed in PNG format. The following example shows how to reduce the size of an image and display it in the browser:

<!--- This example shows how to create a ColdFusion image from a JPEG file, resize it, and

then display it in the browser as a PNG image. --->

<cfimage source="../cfdocs/images/artgallery/jeff05.jpg" action="resize"

width="50%" height="50%" name="smLogo">

<cfimagesource="#smLogo#"action="writeToBrowser">

Likes

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 ,
Mar 08, 2017 Mar 08, 2017

Copy link to clipboard

Copied

That worked for me !!

Resize and show in browser without a need to save in folder, but it will get stored in a temp folder like this CFFileServlet/_cf_image if so it will consume more space?    

Likes

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
Advocate ,
Mar 08, 2017 Mar 08, 2017

Copy link to clipboard

Copied

It wont consume much space as its only a temporary place. The image will be there for a short time (around 5 mins) then disappear.

Likes

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 ,
Mar 08, 2017 Mar 08, 2017

Copy link to clipboard

Copied

LATEST

Many thanks

Likes

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