Jump to content

display correct picture


crouchjay

Recommended Posts

On a portion of my site the user is able to crop the images to liking, but the cropped image stays when trying to recrop the same image, but when I press the refresh button the newly cropped image replaces the previous cropped image.  How do I fix this? 

Jay.

Thanks a lot for the help.
Link to comment
Share on other sites

The process works in such, that when the user decides to crop an image, it gets stored in tmp.  The cropped image is displayed, where they have the choice of either NEW IMAGE, RECROP, SUBMIT

Here is the code for recrop selection
[code]if ($_POST['recrop']) {
unset($display);
unset($image);

            //Path to image
            $imgfile=$_REQUEST['display'];

            //Image Name
            $image=$_REQUEST['imgfile'];

            //Delete cropped image
            unlink($imgfile);
}

//If Image name found get Original Image
if($image != "") $display="userImages/$username/largeVersion/".$image;

//goto image crop html page
include_once( "HTML/createProfileImage.html" )
[/code]


So the original cropped image gets deleted from the file system, this has been proved, but after the second recrop of the image the original still displays until the refresh button is pushed.

If there is any more code you want to see just let me know.

Thanks

Jay

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.