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

Question about how cfimage works?

Explorer ,
Nov 18, 2007 Nov 18, 2007

Copy link to clipboard

Copied

I have the following code where I let users upload a picture and I create a thumbnail and if the picture they upload is too big, I resize a second larger picture to fit in the desired dimensions. In the following code, for some reason, the thumbnail gets created, but the second resize never happens? I've tested both sets of code separately and they work fine. It's only when I try to create both together that the second one doesn't get resized. I did a test and it never even gets in the if function even though the original picture is 1000 pixels wide. It's like it's not looking at the correct picture to get the dimensions? I think I'm missing something in how cfimage processes the image files. Can anyone explain it to me or tell me a better way of doing the following? Any help is much appreciated! ~Holli
TOPICS
Advanced techniques

Views

496

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 ,
Nov 18, 2007 Nov 18, 2007

Copy link to clipboard

Copied

your <cfimage action="info" ...> and later code is working with the
resized thumbnail image you created in the previous steps... change the
source attribute to the original #ExpandPath("..\cats\")##id#.jpg ...

---
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
Explorer ,
Nov 18, 2007 Nov 18, 2007

Copy link to clipboard

Copied

Thanks Azadi. I tried that, but when I did, the second picture was really blurry - not like it was when doing it alone. I ended up creating two image sources at the beginning:

<cfimage source="#ExpandPath("..\cats\")##id#.jpg" name="catThumb">
<cfimage source="#ExpandPath("..\cats\")##id#.jpg" name="cat">

That seems to be working, but I still don't understand why it doesn't use the original image for both sources. 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
Explorer ,
Nov 18, 2007 Nov 18, 2007

Copy link to clipboard

Copied

Thanks Azadi. I tried that, but when I did, the second picture was really blurry - not like it was when doing it alone. I ended up creating two image sources at the beginning:

<cfimage source="#ExpandPath("..\cats\")##id#.jpg" name="catThumb">
<cfimage source="#ExpandPath("..\cats\")##id#.jpg" name="cat">

That seems to be working, but I still don't understand why it doesn't use the original image for both sources. 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
Explorer ,
Nov 18, 2007 Nov 18, 2007

Copy link to clipboard

Copied

Thanks Azadi. I tried that, but when I did, the second picture was really blurry - not like it was when doing it alone. I ended up creating two image sources at the beginning:

<cfimage source="#ExpandPath("..\cats\")##id#.jpg" name="catThumb">
<cfimage source="#ExpandPath("..\cats\")##id#.jpg" name="cat">

That seems to be working, but I still don't understand why it doesn't use the original image for both sources. 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
Explorer ,
Nov 18, 2007 Nov 18, 2007

Copy link to clipboard

Copied

Thanks Azadi. I tried that, but when I did, the second picture was really blurry - not like it was when doing it alone. I ended up creating two image sources at the beginning like below. That seems to be working, but I still don't understand why it doesn't use the original image for both sources. 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
Explorer ,
Nov 18, 2007 Nov 18, 2007

Copy link to clipboard

Copied

LATEST
Sorry for the multiple posts. The Adobe site keeps throwing errors and I didn't think any of them were posted.

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