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 3792496
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:37:52+00:00 2026-05-19T12:37:52+00:00

This Code saves the image like it’s suppose to, but instead of displaying it

  • 0

This Code saves the image like it’s suppose to, but instead of displaying it as a picture, what is displayed is a line of text inside the picture. help?

<?php

    imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $opacity);


    // print image to screen
    header("content-type: image/jpeg");
    imagejpeg($image, "modified-images/".$codigo2."_modified_picture_status_".$status.".jpg");
    imagedestroy($image);  
    imagedestroy($watermark);

    ?>
  • 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-19T12:37:53+00:00Added an answer on May 19, 2026 at 12:37 pm

    If you are using the second parameter of imagejpeg, the image will not be outputted to the browser but ONLY saved to the file.
    Try omitting the second parameter if you don’t need to save it as a file, and it should output directly to the browser.

    If you want to do both, try a print(file_get_contents($imagepath)) after your current block of code. $imagepath should obviously contain the path that you wrote the image to.

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

Sidebar

Related Questions

I have programmed a proxy.php script (listed below), which would fetch an image specified
Please note that this question is about CGLayer (which you typically use to draw
I have a byte[] that was serialized with the following code: // Save an
I have panel and various controls on it. I would like to save an
I would like to create a bitmap in memory, set some of the pixel
I am doing some image scaling using GDI+ (C#), and have noticed a problem
In my Android App Activity, I have a RelativeLayout with one ImageView and a
I need to be able to load RGB pixel values at a certain resolution
Currently i have system that's do resizing and creating as many images as needed

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.