Hi guys...i have used CSS, and JCrop to crop an image and save the width, height, x and y of the image in my MySQL DB. I am finding it hard to display the image now. Could someone please guide me? I tried using Imagick::cropImage but that didn't work. Any help would be appreciated.
As you didn't provide us any piece of code we can work with, I'll just try and guess what's going around. Firstly, what's the difference from your point of view between width,height and x,y , as I can't really figure what x and what y did you save. Secondly, why not just saving the image, if it's static into a folder, then display it to the users via a file named resize.php or whatever. I'll try to explain you the idea, or the structure of a php cropping script. 1. Uploading the image 2. File will check if the image is valid, will parse it's info, will give it a new name lets say some combo between userid and auto incremented uploaded image id. Eg: USERID_PHOTOID_TIMESTAMP.JPG / 12_182_1234567890.jpg 3. Then it will attempt to save the cropped image , and in case of sucess, it inserts into the database (id,userid,path,dateline) values (182,12,'12_182_1234567890.jpg',1234567890) It can be simpler, without users, but the idea is the same, only the new name differs. The point is, you don't have to store any with nor height, nor x and y coordinates or whatever they are.