Highlighted

Resize images without saving anywhere in the server

New Here ,
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!!

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">

Views

448

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

Resize images without saving anywhere in the server

New Here ,
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!!

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">

Views

449

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
Mar 08, 2017 0
Advocate ,
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
Reply
Loading...
Mar 08, 2017 0
New Here ,
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
Reply
Loading...
Mar 08, 2017 0
Advocate ,
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
Reply
Loading...
Mar 08, 2017 0
New Here ,
Mar 08, 2017

Copy link to clipboard

Copied

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
Reply
Loading...
Mar 08, 2017 0