Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 859035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:37:23+00:00 2026-05-15T08:37:23+00:00

Hi I have to flip a thumpnail image before merge it with another jpeg

  • 0

Hi I have to flip a thumpnail image before merge it with another jpeg file. but when I rotate 45 degree using php. It shows a black background. how can I avoid that. any body can help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:37:24+00:00Added an answer on May 15, 2026 at 8:37 am
    <?
    $image = "130.jpg";
    $degrees = 25;
    for($i=0;$i<count($data);$i++){
        $ext = "";
        $extarr = "";
        $extarr = explode(".", $data[$i]['name']);
        $ext = array_pop($extarr);
        if($ext == "png"){
            $rotate = imagecreatefrompng("images/".$data[$i]['name']);
            $transColor = imagecolorallocatealpha($rotate, 255, 255, 255, 270);
            $watermark1[$i] = imagerotate($rotate, ((360-$degrees)%360), $transColor);
        }
    }
    
    function imagecopymerge_alpha($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $opct){
        $w = imagesx($src_im);
        $h = imagesy($src_im);
        $cut = imagecreatetruecolor($src_w, $src_h);
        imagecopy($cut, $dst_im, 0, 0, $dst_x, $dst_y, $src_w, $src_h);
        imagecopy($cut, $src_im, 0, 0, $src_x, $src_y, $src_w, $src_h);
        imagecopymerge($dst_im, $cut, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, (100 - $opct));
    }
    
    
    for($i=0; $i<count($watermark1); $i++){
        if($i == 0) imagecopymerge_alpha($image, $watermark1[$i], $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $opacity);
        else imagecopymerge_alpha($image, $watermark1[$i], ($i*$dest_x)*3, ($i*$dest_y)*15, 0, 0, $watermark_width, $watermark_height, $opacity);
        imagedestroy($watermark1[$i]);
    }
    header("content-type: image/png");
    imagepng($image);
    imagedestroy($image);
    ?>
    

    Also, do your watermark images have alpha channel or are they fully opaque?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Quickflip 2 plugin ( http://jonraasch.com/blog/quickflip-2-jquery-plugin/comment-page-3#comment-3562 ) to have images flip
I have an app that uses a transition file to flip from page to
I have created a 3D flip of a view using this android tutorial However,
I have two questions but somehow related: How to implement flip 3d without Aero
hello all i am using this code to show flip animation...... i have a
I have one png image. Then, I want to flip this triangle as on
Does anyone know if its possible to flip an image and have content on
I have made an iphone application like flip cards in which values of cards
I have an app that uses the built-in flip animation to switch between the
I have a problem where depending on the result of a random coin flip,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.