Thumbs of .jpg on white background get border

Posted by Community Admin on 04-Aug-2018 12:27

Thumbs of .jpg on white background get border

All Replies

Posted by Community Admin on 02-May-2014 00:00

Anyone else haveing the problem that the Sitefinity generated thumb images of .jpg with white background produce a gray border in the image?

Markus

 

Posted by Community Admin on 07-May-2014 00:00

Hi Markus,

I was not able to replicate similar issue using 6.3 and 7.0. Can you please send us some screenshots or a short video to illustrate the problem? It will be also great if you can attach and a sample image which I can use to test on my end.

Regards,
Kaloyan
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 07-May-2014 00:00
Posted by Community Admin on 12-May-2014 00:00

Hello Markus,

Thank you for the provided video and sample image.

I have tested the scenario with your image and samples of jpeg and png by using original size, build-in size options and custom size option (please find the comparison).

The only issue reproduced is with the sample image provide and by using the custom size.

Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 12-May-2014 00:00

Dear Svetoslav

1) did you use .jpg on your two image
2) did you try both : create thumbs for the library and let the image be created to its size automatically (lazy)

And what is the bottom line then? 

a) I have a bad source image
b) just don't use custom size

???

Markus

Posted by Community Admin on 15-May-2014 00:00

Hi Marcus,

I have tested your scenario with a blank image in jpg format with the original size of your image (800x800px) and reproduce the issue with the custom thumbnail size (320x240px). The same is not valid for example to png format that I have tested also.

As we are using standard .Net functionality for that resizing this behaviour could not be changed for the time being. You could check System.Drawing.Graphics class if the result is the same.

So I would recommend you to use thumbnail size without such issue or use another image format, when you have white image background.

Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 15-May-2014 00:00

Dear Svetoslav

From the web
I had a similar problem, and learned the following: 

g.DrawImage(postedFile, -1, -1, width + 1, height + 1) (this left a border on the right and bottom of my image)

g.DrawImage(postedFile, -1, -1, width + 2, height + 2)
(no border, but lost a pixel, and I don't want to die over a lousy pixel)

Dim outRect As New RectangleF(-0.5, -0.5, width + 1, height + 1)
g.DrawImage(postedFile, outRect)
(worked flawlessly)

Might be something to look at. 

Markus

 

PS as well as this: stackoverflow.com/.../c-sharp-resized-images-have-black-borders

 

Posted by Community Admin on 19-May-2014 00:00

Hello Marcus,

Thank you for the provided additional information. I have forwarded it to our developers. In case there is some development in that direction I will update this thread.

Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed