[wp-trac] [WordPress Trac] #18543: Wrap imagejpeg et al to support stream wrappers

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 29 19:35:11 UTC 2011


#18543: Wrap imagejpeg et al to support stream wrappers
---------------------------+-----------------------------
 Reporter:  adambackstrom  |      Owner:
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Media          |    Version:
 Severity:  normal         |   Keywords:
---------------------------+-----------------------------
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18543>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list