ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been searching the net for a solution to this problem for a couple hours, and I can't find any solution...I am writing a script which will resize an image from 640x480 to 320x240 to display on a page. I am using PHP4.x.x with GD2.0. The followng line:
Returns the error,
"Warning: imagecreatefromjpeg: Unable to open '/images/uploaded/rail_small.JPG' for reading in /usr/local/apache/htdocs/image_test.php on line 3
"
I tried several different images all with the same result. I know that the permissions are set right and the path is right. Is this the result of an error I made in configuration?
Alright. I tried your exec() solution, but couldn't figure out how to get it working. I fiddled with the imagecreatefromjpeg function some more and it is working now (although I don't really know what I did). Now my problem is that I want to display a resized picture on a web page randomly. I need to set the Content-type to image/jpeg, but I can't because it has already been set to text/html. Is there a way around this?
I tried setting the Content-type, but it was already set to text/html and I can't change it. The images I am using are to stay full size and only be resized to display on this page. For this reason, they are not saved as a small image and so can't use an img tag.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.