Ticket #115 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 3 years ago

Imageantialias doesn't support PNG. Needs either an implementation or test to skip PNG

Reported by: drmike Assigned to: donncha
Priority: lowest Milestone:
Component: component1 Version:
Severity: minor Keywords:
Cc:

Description

r712, vhsost = on.

You're going to have to forgive me on this one. I know little about GD and how php generates image files. :)

Per this thread in the forum:

http://mu.wordpress.org/forums/topic.php?id=1652

I'm getting that error when I try to upload a *.png file. I gather that that function 'imageantialias' has some issue with *.PNGs but there appears not be any any error check for them in that function before it hits that line.

I do know that if it skips lines 867-8 (ie I comment it out), it uploads fine but a thumbnail is not generated. That might explain the occasional "No thumbnail" and the line is crossed out issue we get on occasion over on the WP.com forums. I don't remember anyone ever mentioning what file type they are trying to use when they get that error. (And we all know how hard it is to drag details out of folks.)

Is this a defect? Sounds like we need to do some file type checking.

Hope this helps, -drmike

Attachments

gd_memory.patch (2.2 kB) - added by abarker on 08/28/06 23:33:05.
gd_memory.2.patch (1.8 kB) - added by abarker on 08/28/06 23:34:44.

Change History

08/03/06 19:46:16 changed by drmike

I get the error as well with *.gifs. Hmmm....

08/04/06 06:07:08 changed by donncha

  • owner changed from somebody to donncha.
  • status changed from new to assigned.

Can you check what image support GD has loaded? Maybe it doesn't have png (and gif) support loaded.

08/04/06 16:00:24 changed by drmike

v2.0.28

Per this page:

http://daria.be/phpinfo.php

I would say yes but I opened up a ticket with my host to verify.

Thanks, -drmike

08/04/06 17:08:58 changed by drmike

Host confirms *.png and *.gid support for that version of GD.

08/20/06 11:35:02 changed by mrjcleaver

  • summary changed from Issue with *.png files to imageantialias doesn't support PNG. Needs either an implementation or test to skip PNG.

08/20/06 14:39:28 changed by mrjcleaver

  • summary changed from imageantialias doesn't support PNG. Needs either an implementation or test to skip PNG to Imageantialias doesn't support PNG. Needs either an implementation or test to skip PNG.

08/28/06 16:36:57 changed by donncha

  • status changed from assigned to closed.
  • resolution set to wontfix.

This is really an issue with WordPress? core, can you add a ticket to http://trac.wordpress.org/ ?

08/28/06 23:32:46 changed by abarker

Ok this is a bit tricky... It sounds like an issue i was having with VERY LARGE image files... upwords of 1280x1024. Its the server running out of memory and basically failing on create thumbnail. I fixed this with a few functions rewritten from the php.net website. These function allow a dynamic allocation of memory to the gd process based on an estimate of how much memorty the image will need during processing. This is a very dangerious fix and should probably not be added to the code in its current form as it may cause the server to run out of resources and crash.

Attached is the patch.

08/28/06 23:33:05 changed by abarker

  • attachment gd_memory.patch added.

08/28/06 23:34:44 changed by abarker

  • attachment gd_memory.2.patch added.

08/28/06 23:36:07 changed by abarker

  • priority changed from normal to lowest.
  • status changed from closed to reopened.
  • resolution deleted.
  • severity changed from normal to minor.
  • type changed from defect to enhancement.

use patch #2

08/28/06 23:38:50 changed by abarker

  • status changed from reopened to closed.
  • resolution set to wontfix.

08/29/06 19:04:11 changed by drmike

abarker, if you see this, here's the ticket over on Wordpress.org:

http://trac.wordpress.org/ticket/3076