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

Another CFIMAGE question

LEGEND ,
Aug 14, 2012 Aug 14, 2012

Copy link to clipboard

Copied

Hello, everyone.

I've got the CFIMAGE action="writeToBrowser" working, now I just have one more question in regards to this particular project.

How do I resize the image?

Here is what I have, so far:

<cfinvoke component="components.announce" method="getFile" returnvariable="getFile">

  <cfinvokeargument name="docID" value="#qry.DocumentID#">

</cfinvoke>

<p><div style="float:left;"><cfimage action="writeToBrowser" source="#getFile#"></div>#some text#</p>

The image is 290x160, and I'd like to scale it down, a bit.  How could I do that?

Thank you,

^_^

Views

491

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

Engaged , Aug 14, 2012 Aug 14, 2012

Have you tried the ImageResize function?

Votes

Translate

Translate
Engaged ,
Aug 14, 2012 Aug 14, 2012

Copy link to clipboard

Copied

Doesn't cfimage allow you to resize 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
LEGEND ,
Aug 14, 2012 Aug 14, 2012

Copy link to clipboard

Copied

I've been looking at the documentation for CFIMAGE and I'm not seeing it for files created via BLOB.  I think you can use ImageNew() for files that exist on the web server, but I tried that with a BLOB file, and it isn't working.

Thank you,

^_^

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
Engaged ,
Aug 14, 2012 Aug 14, 2012

Copy link to clipboard

Copied

Have you tried the ImageResize function?

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 ,
Aug 14, 2012 Aug 14, 2012

Copy link to clipboard

Copied

LATEST

I had to toy with it, and I didn't really understand it, at first.  But, here is what worked:

<cfset tmp = ImageNew("#getFile#")>

<cfset ImageResize(tmp,"100","")>

<cfimage action="writeToBrowser" source="#tmp#">

Thanks, again, Miguel.

^_^

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