Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating image with unnecessary top padding #4

Open
muralibobby35 opened this issue Jan 10, 2020 · 0 comments
Open

Creating image with unnecessary top padding #4

muralibobby35 opened this issue Jan 10, 2020 · 0 comments

Comments

@muralibobby35
Copy link

muralibobby35 commented Jan 10, 2020

Hi,

Functionality is working fine in our test and stage but unnecessary space adding on top of the text in production.

Here is my code:

list($left,, $right) = imageftbbox( $fontSize, 0,$fontPath, str_replace(' ', '_',$string));
        $width = $right - $left;
$basicImage = new \Rathouz\TextImage\TextImage($string);
       $basicImage->setTextColor(Objects\Color::create($textColor));
       $basicImage->setFontPath($fontPath);
       $basicImage->setTransparentBackground(true);
       $basicImage->setWidth($width);
       $basicImage->setFontSize($fontSize);
       $basicImage->setPadding(5);
       $image = $basicImage->generate();        
       $image->move($finalImage,TRUE);

Here i am adding my production logo and stage logo. Please download two images and check once.Please check how much padding adding on top. Please let me know where can i change configurations?

production

stage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant