Re: GD Error on displaying png image

From: Jeffrey Silverman (jeffrey_at_pantsjhu.edu)
Date: 08/30/04


Date: Mon, 30 Aug 2004 12:07:36 -0400

On Sun, 29 Aug 2004 16:52:40 +0200, Xiao Tencas wrote:

> The testcode I use:
> <?php
> $photo = "image.png";
> $im = @ImageCreateFromPng ($photo);
> header ("Content-type: image/png");
> ImagePng ($im);
> ?>

No clue. But to debug GD images, you can change the header to
"Content-type: text/plain" temporarily. This will dump the contents to the
screen as plain text, including error messages!

-- 
    Jeffrey D. Silverman | jeffreyPANTS@jhu.edu **
                 Website | http://www.newtnotes.com
(** Drop "pants" to reply by email)


Relevant Pages

  • Re: fread()
    ... fclose($fh); ... header('Content-type: text/plain'); ...
    (comp.lang.php)
  • Re: Controlling Javascript from server side
    ... ECMAScript in Opera, KJS ECMAScript in Konqueror, and JavaScriptCore ... That would make the HTTP request invalid, as the header name "Content-Type" ...
    (comp.lang.javascript)
  • Re: [Fastboot] Re: Query: Kdump: Core Image ELF Format
    ... KVA for linearly mapped region is known in advance and can ... >> be filled at header creation time and gdb can directly operate upon this ... And before a kernel crashes looks like a reasonable ... > not the user who is capturing the system core dump. ...
    (Linux-Kernel)
  • Re: How to set content-type header for ASP/HTML pages only ?
    ... The right way to do this association is with a MIME-Type (IIS can configure ... set the value of the Content-Type header on a per-extension basis. ... I would like to set the content-type HTTP header for Content-Type. ... Is there any way to set the Content-Type specific to file type? ...
    (microsoft.public.inetserver.iis)
  • Re: How to set content-type header for ASP/HTML pages only ?
    ... Character encoding, per the HTTP 1.1 spec on W3C, is a part of Content-Type ... you should configuration the MIME Map setting on IIS (it's right below ... >set the value of the Content-Type header on a per-extension basis. ...
    (microsoft.public.inetserver.iis)