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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:56:57+00:00 2026-05-29T15:56:57+00:00

Im creating images to output. When I call the final imagegif() I get the

  • 0

Im creating images to output. When I call the final imagegif() I get the usual “the image sdfsdsdf cannot be displayed because it contains errors”. But if I save this image by the 2nd parameter, it DOES result in a valid GIF image! And imagegif() returns true.
Now what?

  • 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-29T15:56:58+00:00Added an answer on May 29, 2026 at 3:56 pm

    But if I save this image by the 2nd parameter, it DOES result in a
    valid GIF image! And imagegif() returns true. Now what?

    Check the output of your script – it sends something else to the browser. Typically it could be error/warning/notice messages, text output from that script or from another one included into it, spaces/new lines or something else (like BOM record in case of UTF encoding in script file) before the <?php tag.

    Solution is simple – comment the header('Content-Type: image/gif'); and call script directly (not the page including the images generated by the script). Check for anything before the ‘garbage’ of the binary content of the image file itself.

    You may need to add error_reporting(E_ALL); ini_set('display_errors', 1); at the top of the script in case error reporting/display is turned off as well.

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

Sidebar

Related Questions

I'm creating a program in VB.NET to output multiple images. Some images will have
I am creating a form designer and have a toolbox that contains images of
I want to experiment with creating images/thumbnails of PHP output. A place where one
I'm confused because I cannot establish why my ImageList_Add call is failing. I know
I am creating a new project: rails new ggg --database=mysql and get following output:
I am creating some images in my page. When I write <img src=somesrc, onerror=othersrc></img>
I am designing a website, I am creating some images for that website by
I am creating my own carousel slideshow for images, using Jquery. Currently i have
I am creating a website for funny images. Those images are stored in a
Im creating a Yii app where i will save images into the database. Now

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.