I've been working on a network camera project at work and will be starting one at home as soon as my network camera arrives.
My current set up is as follows:
Cisco IP Phone requests XML and images from a web server. The web server must first download a copy of the image from the network camera and save it to the disk. Then the recently downloaded jpg is resized/converted to a png using ImageMagick. After this process is done, PHP reads the contents of the newly created png and echos it out using the correct mime/type.
Sometimes the Cisco IP Phone displays a blank gray image. The phone still successfully connects to the web server via HTTP, but the content being returned is corrupted in some way. I believe this may have something to do with buffering the outputted image. It seems like the phone isn't completely waiting on the PHP script to echo the contents of the png.
Any other ideas on how to reduce the occurrence of errors?
Also, is there anyway to use ImageMagick without "files"? I think it would be much more efficient to skip the saving and deleting of the jpg and png.
The ImageMagick command I'm using right now is "convert file.jpg file.png". I'm wondering if there is something like "convert 'contents of a jpg' -filetype png" and then it just echos out the content of a png file.
Fortunately at home, I'll have no need to convert (and hopefully resize) images on the web server since I'll be using a web browser rather than a phone with no jpg support.
My current set up is as follows:
Cisco IP Phone requests XML and images from a web server. The web server must first download a copy of the image from the network camera and save it to the disk. Then the recently downloaded jpg is resized/converted to a png using ImageMagick. After this process is done, PHP reads the contents of the newly created png and echos it out using the correct mime/type.
Sometimes the Cisco IP Phone displays a blank gray image. The phone still successfully connects to the web server via HTTP, but the content being returned is corrupted in some way. I believe this may have something to do with buffering the outputted image. It seems like the phone isn't completely waiting on the PHP script to echo the contents of the png.
Any other ideas on how to reduce the occurrence of errors?
Also, is there anyway to use ImageMagick without "files"? I think it would be much more efficient to skip the saving and deleting of the jpg and png.
The ImageMagick command I'm using right now is "convert file.jpg file.png". I'm wondering if there is something like "convert 'contents of a jpg' -filetype png" and then it just echos out the content of a png file.
Fortunately at home, I'll have no need to convert (and hopefully resize) images on the web server since I'll be using a web browser rather than a phone with no jpg support.