Osclass Support Forums

Osclass theme support => Free themes => Topic started by: Альтаир Ибн Ла-Ахад on December 14, 2016, 11:55:22 PM

Title: Problem with watermark
Post by: Альтаир Ибн Ла-Ахад on December 14, 2016, 11:55:22 PM
Hi all. I have some problem with my watermark... I upload png image as watermark with transperency background but when i upload some listing's image the watermark in part out of listing image is black (see attachement) Please help me fix it.
Thank you very much
Title: Re: Problem with watermark
Post by: MB Themes on December 15, 2016, 08:51:31 AM
This is osclass related issue, might be bug, you can report it to them (I know they have similar bug on their market where png images getting black background)
Title: Re: Problem with watermark
Post by: Альтаир Ибн Ла-Ахад on December 16, 2016, 10:30:40 PM
Thak you vor help.
Title: Re: Problem with watermark
Post by: atba on November 01, 2021, 11:49:21 AM
How was this problem solved? She is still present
Title: Re: Problem with watermark
Post by: MB Themes on November 01, 2021, 12:58:34 PM
Is it? Send some png that cause it, we may check that
Title: Re: Problem with watermark
Post by: atba on November 01, 2021, 01:13:13 PM
Absolutely any with a vertical arrangement. See the example
Title: Re: Problem with watermark
Post by: MB Themes on November 01, 2021, 01:14:33 PM
Image woth vertical alignment cause problems with watermark?
Title: Re: Problem with watermark
Post by: atba on November 01, 2021, 01:23:07 PM
No, you don't understand. If you load a vertical image, as in the example, white fields are formed accordingly (necessary to preserve proportions). Accordingly, the transparent watermark (.png) on the white margins has a black background.
Title: Re: Problem with watermark
Post by: atba on November 02, 2021, 06:37:19 AM
Well, what do you say? Is it possible to get rid of the black background under the watermark? Of course, you can turn on Image Magic, as some advise, but it often sets the wrong orientation with images and turns them 90 degrees.
Title: Re: Problem with watermark
Post by: MB Themes on November 02, 2021, 08:31:21 AM
@atba
Ok so you actually use GD Library instead of ImageMagick.
In that case I would say it is bug of GD library and not of osclass.
You may try to use "best crop" option to avoid white spaces or place watermark into middle of picture as workaround here.
Title: Re: Problem with watermark
Post by: atba on November 02, 2021, 01:18:23 PM
Well, it's easier to disable the watermark altogether. But this is not the solution. Then tell me how to make Image Magic not rotate images when loading?
Title: Re: Problem with watermark
Post by: MB Themes on November 02, 2021, 02:53:20 PM
@atba
In oc-includes/osclass/ItemActions.php you have this line:
Code: [Select]
$img     = $imgres->autoRotate();
if you change it to following, auto rotate should be disabled:
Code: [Select]
$img     = $imgres;
Title: Re: Problem with watermark
Post by: atba on November 04, 2021, 12:21:14 AM
A great solution. Thanks!