Image resizing issue

rated by 0 users
Answered (Verified) This post has 1 verified answer | 10 Replies | 2 Followers

jeffesp
Top 75 Contributor
263 Posts
Points 3,880
By: jeffesp
Posted: Fri, May 16 2008 11:08 AM

I have a site that I upgraded from CS2007.  I have a <CSMedia:MediaGalleryPostData> control in the 08 version of the site where I set the image Width and Height set to 100x90.  The resulting URL looks something like this:

http://localhost/cs/resized-image.ashx/__size/100x90/__key/CommunityServer.Components.PostAttachments/00.00.00.11.81/Mountain_5F00_Beaver_5F00_Closeup_5B00_1_5D002E00_jpg

And the image that comes out is 97x89 px.  This is great, but it doesn't seem to work for all photos in the site.  For another image on the site:

http://localhost/cs/resized-image.ashx/__size/100x90/__key/CommunityServer.Components.PostAttachments/00.00.00.11.68/IMG_5F00_9674.jpg

It tries to generate an image, but I end up with the red x error image instead.

From debugging the process, I can see that the ProcessRequest() method in ImageFileResizerHttpHandler isn't even getting called. 

Is there a reason this would work for some images and not others?

--
--Jeff (ATGi)
 
  • Post Points: 20 |

Answered (Verified) Verified Answers

jeffesp
Top 75 Contributor
263 Posts
Points 3,880
Answered (Verified) By: jeffesp
Posted: Fri, May 16 2008 5:05 PM In reply to

I just moved to a different server here, and it ended up working for all images/all sizes as well.  I haven't made any customizations, it was in debug mode so I could see if the handler was executed on the requests for the images.  I guess I am going to leave this issue as it works on the machine that it needs to for now.  Thanks for all your help.

--
--Jeff (ATGi)
 
Answered (Verified)
  • Post Points: 5 |

All Replies

jeffesp
Top 75 Contributor
263 Posts
Points 3,880
By: jeffesp
Posted: Fri, May 16 2008 11:26 AM In reply to

The same thing occurs when I point a default install of CS2008 at my database, copy the filestorage directory into that install, and go to the top Media page.  So it looks like this is an upgrade issue, or a bug in the code.

--
--Jeff (ATGi)
 
  • Post Points: 5 |
Ben Tiedt
Top 10 Contributor
3,338 Posts
Points 63,065
CS Developers
By: Ben Tiedt
Posted: Fri, May 16 2008 11:33 AM In reply to

jeffesp:

For another image on the site:

http://localhost/cs/resized-image.ashx/__size/100x90/__key/CommunityServer.Components.PostAttachments/00.00.00.11.68/IMG_5F00_9674.jpg

It tries to generate an image, but I end up with the red x error image instead.

 

Does the IMG_9674.jpg file exist in the filestorage/CommunityServer.Components.PostAttachments/00/00/00/11/68/ folder?  Or is this file missing?

Ben Tiedt's Blog

 
  • Post Points: 20 |
jeffesp
Top 75 Contributor
263 Posts
Points 3,880
By: jeffesp
Posted: Fri, May 16 2008 11:45 AM In reply to

 There are two files in that directory: IMG_9674.jpg and IMG_9674.jpg-131x94.jpg

--
--Jeff (ATGi)
 
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
3,338 Posts
Points 63,065
CS Developers
By: Ben Tiedt
Posted: Fri, May 16 2008 12:13 PM In reply to

1.  Can both of these files be viewed directly from the file-system?

2. Could you view the source of a Community Server-generated page and ensure that your Build identifies "30417.1769" in the <meta name="GENERATOR" /> tag?

 

Ben Tiedt's Blog

 
  • Post Points: 20 |
jeffesp
Top 75 Contributor
263 Posts
Points 3,880
By: jeffesp
Posted: Fri, May 16 2008 12:45 PM In reply to

These files are accessible on the filesystem.

The full meta tag is: <meta name="GENERATOR" content="CommunityServer 2008 (Debug Build: 30417.1769)" />

Another piece of information: the files that will display seems to change based on what size I specify.  I can change the width and height on the data control, and get different images to display.  If I leave off the width and height, all images will display.

--
--Jeff (ATGi)
 
  • Post Points: 20 |
jeffesp
Top 75 Contributor
263 Posts
Points 3,880
By: jeffesp
Posted: Fri, May 16 2008 1:44 PM In reply to

 A little more info as I continue to try to debug this, in case any of it helps.

  1. I misspoke earlier - I am using a MediaGalleryPostViewer, not a MediaGalleryPostData.
  2. The full tag is: <CSMedia:MediaGalleryPostViewer runat="server" ViewType="Preview" Width="100" Height="90" />
  3. This is inside of a <CSMedia:MediaGalleryPostData Linkto="View">, which in turn is in a <CSMedia:MediaGalleryPostList>

 

--
--Jeff (ATGi)
 
  • Post Points: 5 |
Ben Tiedt
Top 10 Contributor
3,338 Posts
Points 63,065
CS Developers
By: Ben Tiedt
Posted: Fri, May 16 2008 3:44 PM In reply to

jeffesp:
Another piece of information: the files that will display seems to change based on what size I specify.  I can change the width and height on the data control, and get different images to display.  If I leave off the width and height, all images will display.
 

Could you post an image and a width/height that doesn't work with the image?

Ben Tiedt's Blog

 
  • Post Points: 20 |
jeffesp
Top 75 Contributor
263 Posts
Points 3,880
By: jeffesp
Posted: Fri, May 16 2008 3:57 PM In reply to

 

 

Doesn't work at 81x81, but does work at 100x90.

--
--Jeff (ATGi)
 
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
3,338 Posts
Points 63,065
CS Developers
By: Ben Tiedt
Posted: Fri, May 16 2008 4:53 PM In reply to

Here is the file in 81x81:

Mountain_Beaver_Closeup[1].jpg

It seems to work here.  Did you make any code changes to the image resizer in CS (I noticed that your site was running in debug mode)?

Ben Tiedt's Blog

 
  • Post Points: 20 |
jeffesp
Top 75 Contributor
263 Posts
Points 3,880
Answered (Verified) By: jeffesp
Posted: Fri, May 16 2008 5:05 PM In reply to

I just moved to a different server here, and it ended up working for all images/all sizes as well.  I haven't made any customizations, it was in debug mode so I could see if the handler was executed on the requests for the images.  I guess I am going to leave this issue as it works on the machine that it needs to for now.  Thanks for all your help.

--
--Jeff (ATGi)
 
Answered (Verified)
  • Post Points: 5 |
Page 1 of 1 (11 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com