Do not reopen stdout while image resizing #7
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "mymedia2/libravatarserv:patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On Linux, some web-servers (Apache in particular) close file with fd = 1 and offer something else as stdout. Notable difference can be seen with a pipe and an immediate redirection. Consider:
Solution.
The output should be identical in both cases. So do not let ImageMagick to open /dev/stdout by itself, instead write the resulted image to an in-memory buffer and then to a file associated with the "cout" global object.
Fixes: #6
Thanks!