Req #65187 [Asn]: exif_read_data : add support for stream resource

From: Date: Fri, 05 Aug 2016 04:08:44 +0000
Subject: Req #65187 [Asn]: exif_read_data : add support for stream resource
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202934@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65187&edit=1 ID: 65187 Updated by: kalle@php.net Reported by: imprec at gmail dot com Summary: exif_read_data : add support for stream resource Status: Assigned Type: Feature/Change Request Package: EXIF related PHP Version: Irrelevant Assigned To: kalle Block user comment: N Private report: N New Comment: I'm currently working on a patch, and a side thing that is coming out of this is an additional $context parameter for use with non streams, since internally PHP is creating a stream with no context, this can help work around supplying direct addresses like locations thats gated by custom protocols or HTTPS which would need peer verification or similar. I expect this patch to only go in PHP 7.2 and onwards. Previous Comments: ------------------------------------------------------------------------ [2016-08-03 10:04:12] kalle@php.net It seems like all the exif_* functions do not support streams, I'm gonna take a look at it ------------------------------------------------------------------------ [2013-11-25 13:13:45] imprec at gmail dot com After reading the comment of maggus dot staab at googlemail dot com, I reopen the ticket ------------------------------------------------------------------------ [2013-11-25 13:10:34] maggus dot staab at googlemail dot com while the posted example will work, it requires a lot memory on php-side because you need to read the whole file + you need additional space for the base64 encoded string. so its far away from an efficient solution and will not work for big/huge images. ------------------------------------------------------------------------ [2013-07-18 11:38:34] imprec at gmail dot com Closing it as it's actually already supported via exif_read_data('data://image/jpeg;base64,'.base64_encode(file_get_contents('image. jpg'))) ------------------------------------------------------------------------ [2013-07-02 21:47:37] imprec at gmail dot com Description: ------------ exif_read_data currently read exif metadata only from filepath. In case the image is in memory (stream resource, binary string, etc...) the image as to be written on disk before reading the exif data. It would be awesome to be able to read from a stream resource. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65187&edit=1

« previous php.bugs (#202934) next »