Computer Science Canada

Delete a Picture File

Author:  Beastinonyou [ Thu Jan 26, 2012 4:10 pm ]
Post subject:  Delete a Picture File

Does anybody know of some way I can delete saved photos externally, located in a folder.

I can use Pic.Save to save a picture from my program into a .bmp image in a folder, but how would i go about deleting them (without having to manually go in and delete them myself).


Edit: Nevermind, I figured File.Delete was was just for files, etc, hence I would use it for text files. I assumed if there was a Pic.Save function, there would be something to Delete pictures.

Author:  mirhagk [ Fri Jan 27, 2012 1:43 am ]
Post subject:  RE:Delete a Picture File

A picture is just a file, just to clear up any potential confusion, every single thing on your computer is a file, and they are all stored the exact same way, as a series of 1's and 0's. A file extension doesn't change the file, it only changes the name, and provides a way for applications to know in what way the data was stored.

Also a Pic.Delete function would be unclear as to what it does, does it delete a picture from your harddrive, or does it delete the picture from turing's memory? (like Pic.Free)

Author:  Raknarg [ Fri Jan 27, 2012 7:10 pm ]
Post subject:  RE:Delete a Picture File

Are lacking in knowledge or is that a provoking question? If it's the first, I'm pretty sure he's looking for something that would be the opposite of Pic.Save

Author:  Aange10 [ Fri Jan 27, 2012 9:50 pm ]
Post subject:  Re: RE:Delete a Picture File

Raknarg @ 27/1/2012, 6:10 pm wrote:
Are lacking in knowledge or is that a provoking question? If it's the first, I'm pretty sure he's looking for something that would be the opposite of Pic.Save


Right, but he was saying that if there was a built in function to do this (coined Pic.Delete), that there may be some confusion on its intent: if it deleted the file, or if it simply deleted it from Turing's memory.


Edit: Opposite of Pic.Save is Pic.Free. He was looking for a File.Delete command to delete a picture.

Author:  Raknarg [ Sat Jan 28, 2012 10:12 am ]
Post subject:  RE:Delete a Picture File

Now, Pic.New is opposite of Pic.Free. Pic.Save actually saves it as a file, not just as information on turing.

Also, I don't see the confusion as much. Pic.Free releases it from the program, that's simple enough. THerefore if there's a PIc.Save which saves a file and then there Pic.Delete, it should be something that deletes a picture file.

EDIT: Actually, is there a File.Delete?

Author:  Sur_real [ Sat Jan 28, 2012 1:25 pm ]
Post subject:  RE:Delete a Picture File

Yeah I'm pretty sure there's File.Delete but I didn't know there's Pic.Delete...

(Also, File.Delete can't delete pics?!?)

Author:  mirhagk [ Sat Jan 28, 2012 3:00 pm ]
Post subject:  RE:Delete a Picture File

yes File.Delete deletes pictures, since a picture is just a file. And there is know Pic.Delete, it'd be redundant.

Author:  Beastinonyou [ Sat Jan 28, 2012 3:01 pm ]
Post subject:  Re: Delete a Picture File

Yes, there is a File.Delete..

After making this post, I realized that File.Delete works for anything.. I was caught up in the moment thinking, if there is a Pic.Save which exports a picture, there might be a Pic.Delete.

but considering File.Delete does the job for all files, hence there is no need for Pic.Delete (not to be confused with Pic.Free)


I was just adding some functionality to my recent project (http://compsci.ca/v3/viewtopic.php?t=30707), which is that it will export a picture of the Word Search with all the Words revealed.
I was thinking, what if some person can't find all the words, they can then refer to the picture of that Exported Word Search to see where they reside in it.


: