Intervention / image

PHP Image Processing
https://image.intervention.io
MIT License
13.93k stars 1.5k forks source link

Insert Images On Background Foregrounds #1205

Closed manishsharma0196 closed 10 months ago

manishsharma0196 commented 1 year ago

Hey I AM Adding Background Images o on PNG File But PN File Does Not Fit

this is output - https://cdn.pngpexel.com/nuploads/preview/berdiri-serigala-transparan-gambar-png-gratis-dpo92.webp

I Want Like This like this - https://ibb.co/CzVBcts

$watermarkSource = url('public/img/pexel.png'); $watermark = Image::make($watermarkSource);

$imgPreview = Image::make($photo)->resize($widthPreview, null, function ($constraint) { $constraint->aspectRatio(); $constraint->upsize(); })->encode($extension);

  // Insert Watermark

        $watermark->insert($imgPreview, 'center');

$watermark->save($preview)->destroy();

if (\File::exists($preview)) {
  \File::delete($preview);
}

I want the size of the png file to increase