Try our conversational search powered by Generative AI!

Thumbnail blobs are blurred


I have a class that extends 'ImageData'. There I have defined few thumbnail Blob properties for the different sizes. 

[ContentType(GUID = "0a89e464-56d4-449f-aea8-2bf774ab8730")]
[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png")]
public class ImageMedia : ImageData
public virtual string AltText { get; set; }
public virtual string TitleText { get; set; }

/// Gets or sets the generated thumbnail for this media.
[ImageDescriptor(Width = 160, Height = 160)]
public Blob Thumbnail160X160
get { return base.Thumbnail; }
set { base.Thumbnail = value; }


Then I can request the particular image thumbnail in the URL. My problem is this generated thumbnail images look blurred than the original. Even the original image is with high resolution.  
Why is that happening and how to fix it?

Jan 08, 2015 9:28

That happens because you are creating a thumbnail based on the thumbnail which is only 48x48 (if that makes sense).

Change your code to:

        public virtual Blob  MyNewThumbnail{ get; set; }

The new blob will then be created from the source file, and not from the Thumbnail property.

Jan 08, 2015 11:54

Also, remember to run the "clear thumbnail properties" scheduled job, so that you will reset those properties that have already been generated

Jan 08, 2015 13:14

I actually tried this first place but it also gives a blurred thumbnail. According to your answer I did run the "clear thumbnail properties" scheduled job too. Still getting the same blurred thumbnail.  

Jan 12, 2015 6:39

That sounds strange. Are you sure it's not cached? What happens if you create a new property with a different name?

Jan 12, 2015 9:09

Yes. Checked with browser cache cleared. Also created a completely new property with different width and height. still getting a blurred thumbnail. 

Jan 12, 2015 10:12

Does it happen with every image?

Jan 12, 2015 11:06

Just tested with jpg, png and gif. It seems like only jpg images get blurred. This is not a huge quality drop but a slight different is visible in jpg images. 

Jan 12, 2015 11:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.