Req #50373 [Asn]: GD: image* should work with stream handles
| From: | pajoye@php.net | Date: | Wed, 28 Apr 2010 14:41:22 +0000 |
| Subject: | Req #50373 [Asn]: GD: image* should work with stream handles | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-149988@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=50373&edit=1
ID: 50373
Updated by: pajoye@php.net
Reported by: rugkiks at gmail dot com
-Summary: GD: imagepng doesn't doesn't have lockflags
+Summary: GD: image* should work with stream handles
Status: Assigned
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: GNU/Linux
PHP Version: 5.3.1
Assigned To: pajoye
New Comment:
Update the summary to reflect the necessary change, which is not about
adding a locking mechanism in gd.
Previous Comments:
------------------------------------------------------------------------
[2009-12-04 00:34:08] rugkiks at gmail dot com
Yes, it isn't a big deal, and not breaking my workflow. But i believe
file-locking is there for a reason, and is a neat feature making my
code cleaner :).
Tons of programs solve this by having .lock files, so i guess this is
also an understandable code.
------------------------------------------------------------------------
[2009-12-04 00:18:27] rasmus@php.net
I still don't think it is a big deal. Just create a filename.lck file
and lock that while the image is being generated if you need that
feature. It is perhaps 2 extra lines of code.
------------------------------------------------------------------------
[2009-12-04 00:02:20] pajoye@php.net
Let see if we can get something non intrusive without adding yet another
option to this function (already confusing :).
------------------------------------------------------------------------
[2009-12-03 23:55:39] rugkiks at gmail dot com
It's the blocking feature i'm after. When the image is updating,
other fopen's needs to get blocked. It makes my code much more
simpler.
Also, you can do this with ImageMagick, since it allows you to
supply the file handle yourself http://php.net/imagick_writeimagefile
The only reason why i'm requesting this feature to GD, is because of
GD's speed.
rasmus: The renaming-method is nice. But in my case, i need the
users to be blocked until the image is ready. Not just show the old
one, or return a 404. I can program my way out of it, but it's
messy.
I guess i'm saying that it would be nice with a
http://php.net/imagick_writeimagefile for GD.
Thank you for the response.
------------------------------------------------------------------------
[2009-12-03 20:25:58] pajoye@php.net
Same here, I don't see how we could do that for every simple file
related functions. Please follow Rasmus' advice here, best possible
solution.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=50373
--
Edit this bug report at http://bugs.php.net/bug.php?id=50373&edit=1