libGD

GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and “wrappers” are available for Perl, PHP and other languages. GD creates PNG, JPEG and GIF images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve web site development.

See the GD website for more informations.

Tasklist

FS#74 — imagefilledarc can take a lot of CPU

Attached to Project — libGD
Opened by Raphaël MELIOR (RaphAstronome) - Saturday, 14 April 2007, 18:47 GMT+2
Last edited by Pierre Joye (Pierre) - Saturday, 14 April 2007, 19:36 GMT+2
Task Type Bug Report
Category Drawing function
Status Closed
Assigned To Pierre Joye (Pierre)
Operating System All
Severity High
Priority Normal
Reported Version 2.0.34
Due in Version 2.0.35
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

imagearc and imagefilledarc can use a very important amount of CPU if start and end angles is very higher than 360°.

Examples :

imagefilledarc($image, 50, 50, 100, 50, 0, 2147483647, $navy, IMG_ARC_PIE);

- or -

imagearc($image, 50, 50, 100, 50, 0, 2147483647, $navy);

(It can exceed 30 seconds execution time)

A think end-start don’t need to be so large.

For imagefilledarc : His problem is more important if style = IMG_ARC_EDGED or IMG_ARC_PIE but it exists on IMG_ARC_NOFILL and IMG_ARC_CHORD.

This task depends upon

Closed by  Pierre Joye (Pierre)
Saturday, 14 April 2007, 19:36 GMT+2
Reason for closing:  Fixed
Comment by Pierre Joye (Pierre) - Saturday, 14 April 2007, 19:35 GMT+2
  • Field changed: Due in Version (Undecided → 2.0.35)

Oops, thanks for the report. It is fixed already in CVS (angle % 360 helps...) and the fix will be in 2.0.35.

Loading...