#18543 closed enhancement (fixed)
Wrap imagejpeg et al to support stream wrappers
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 3.5 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Media | Keywords: | |
| Focuses: | Cc: |
Description
The GD functions imagejpeg(), imagegif() and imagepng() do not support writing to PHP stream wrappers. This patch provides new wp_imagejpeg(), wp_imagegif(), and wp_imagepng() functions which wrap the GD functions, and a backend function _wp_imageany() which (if necessary) output buffers the image and writes to a stream URL.
A supporting function, wp_is_stream(), is used to identify paths that are stream URLs.
An alternative implementation of _wp_imageany() could write the image to a tmpfile and then copy the image to the stream URL.
Attachments (6)
Change History (13)
@
14 years ago
Bugfix output buffered version; always turn off ob before function ends (thanks, dd32)
Note: See
TracTickets for help on using
tickets.
gd-imagejpeg-wrapper-ob.2.diffis a dupe, please ignore.