+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Thumbs of .jpg on white background get border

Thumbs of .jpg on white background get border

8 posts, 0 answered
  1. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    02 May 2014
    Link to this post

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

    Markus

     

  2. Kaloyan
    Kaloyan avatar
    272 posts
    Registered:
    08 Dec 2016
    07 May 2014
    Link to this post
    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
     
  3. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    07 May 2014 in reply to Kaloyan
    Link to this post

    Dear Kaloyan

    Here we go

    http://www.marktold.com/screencast/sf_7_0_thumb_border.swf

    http://www.marktold.ch/images/default-source/test/untitled-1.tmb-vga.jpg?sfvrsn=2

    vs.

    http://www.marktold.ch/images/default-source/test/untitled-1.jpg?sfvrsn=2

    Markus

  4. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    12 May 2014
    Link to this post
    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
     
  5. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    12 May 2014 in reply to Svetoslav Manchev
    Link to this post

    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

  6. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    15 May 2014
    Link to this post
    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
     
  7. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    15 May 2014 in reply to Svetoslav Manchev
    Link to this post

    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: http://stackoverflow.com/questions/1861305/c-sharp-resized-images-have-black-borders

     

  8. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    19 May 2014
    Link to this post
    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
     
8 posts, 0 answered