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

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

587

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

...

Votes

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

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

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

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

Copy link to clipboard

Copied

LATEST

Many thanks

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