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'm using this code to save images from a specific URL using Image::Grab .
I'm using this piece of code to try and save an image to the
I have this code that saves a pdf file. FileStream fs = new FileStream(SaveLocation,
I have this test code that just saves an XML file to a folder.
Suppose, I have saved some permissions in the database by using this code: RoleRepository
I have some code like this: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Save([Bind(Prefix=)]Person person) { String s
I'm able to save the captured image from a barcode scanner using this code:
I have the following code. QString fileName = QFileDialog::getSaveFileName( this, tr(Output Image file), (),
I am using the following: $chartImage->autoOutput('/statistics/'.$image.'.png'); The problem is that this code outputs the
I have a JLabel inside which I have saved my ImageIcon like this: ImageIcon

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.