Reply to Resize or Create Thumb - Deletes Original

Resize or Create Thumb - Deletes Original new!
by Brian DiChiara, 14 years, 2 months ago
I've created an Image Resize interface that simply allows you to create thumbnails of images. The problem I'm having is the original file is being altered (or deleted) and I can't figure out what is going on.

This is the code:
http://solepixel.pastebin.com/8pJi2Lcq

Here's a demo of the interface:
http://screencast.com/t/ZTVjYzRi

In the video, the first time, the thumbnail isn't getting created. The 2nd time the original image gets deleted. It's supposed to be copying the original the first time and creating a thumb (-thumb.jpg) and just a straight up resize the 2nd time.

Anyone had this same issue know how to fix it?Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important