Erase CRW/CR2/DNG files without corresponding JPG - page 4 - Feature Requests - CHDK Forum supplierdeeply

Erase CRW/CR2/DNG files without corresponding JPG

  • 79 Replies
  • 51471 Views
Re: Erase JPG along with corresponding CRW in any folder - done
« Reply #30 on: 05 / March / 2008, 12:38:03 »
Advertisements
Deleted
« Last Edit: 22 / April / 2008, 12:57:20 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
Re: Erase JPG along with corresponding CRW in any folder - done
« Reply #31 on: 05 / March / 2008, 12:41:48 »
It works as follows:

The first step is to delete the JPG outtakes in playback mode (using Canon's interface).

Now you have 3 options to use Purge RAW function and erase the corresponding RAW files:

1.- Delete all RAW files in DCIM folder including subfolders.
Useful when:
   You keep a separate folder for RAW files.
   You set up the camera to create a new folder everyday (several days trek, holydays etc).
   You want to erase the occasional mischievous RAW file stored in a different folder.


Go to CHDK File Browser, select DCIM folder, push left button to display the popup menu and select "Purge RAW" (See photo 1). A warning will ask you to confirm (See photo 2) and voila! You have regained some SD space.

This feature will search through all the folders in DCIM looking for a RAW file (CRW/CR2 prefix or file extension) and if it finds one then will look for its JPG partner anywhere inside DCIM (comparing the 4 digit number assigned by the camera). If it is not found, the RAW file is erased.


2.- Delete all RAW files in a selected folder.
Useful when:
   You keep RAW files in the same folder as JPG files
   You only want get rid of some RAW files. (Very important shots in some other folder).
   You know which folder has a lot of outtakes.


Go to CHDK File Browser and inside DCIM folder select the folder you want (E.g. "102CANON") and push the left button to display the popup menu. Select "Purge RAW". A warning will ask you to confirm and all the RAW files in ONLY that folder will be erased.

This option works like the previous one but only on the selected Canon folder, the rest are untouched.


3.- Delete some or all RAW files in a list.
Useful when:
   You want to protect specific RAW files (to use them later for HDR)

Go to CHDK File Browser, enter DCIM folder, enter a sub folder (E.g. "102CANON") push the left button to display the popup menu. Select "Purge RAW" (See photo 3). A warning will ask you to confirm and all the RAW files (See photo 4) will be gone.

Now the useful thing of this option is that you can mark the RAW files you DON'T want to erase (protect files). The Purge RAW function will erase the rest of the RAW files ignoring the marked ones.



You can try it here but this is NOT an official build. The purpose should be testing the "Purge RAW" feature only. Do not use it with important shots. Remember, the only way for the community to get stable releases is to try/test these aditions BEFORE commiting. Erasing files in camera is an irreversible operation.

Links updated 7th March. Please report if it works in your camera or not.

allbest-w-a460-100d-43.zip - 0.21MB
allbest-w-a5xx-all.zip - 0.63MB
allbest-w-a6xx-all.zip - 1.12MB
allbest-w-a7xx-all.zip - 0.49MB
allbest-w-g7-all.zip - 0.84MB
allbest-w-ixus-all.zip - 2.07MB
allbest-w-s2is-all.zip - 0.63MB
allbest-w-s3is-100a-43.zip - 0.21MB

ixus950_sd850-100c.zip - 0.21MB

Any comments/suggestions will be appreciated.

I'm not writing the C code in this post, it is too long. If you want to see it here is the diff file. It is getting complicated so I started adding comments.

purgeraw.diff - 0.01MB

Cheers!
« Last Edit: 18 / March / 2008, 09:14:00 by wontolla »

*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
Re: Erase JPG along with corresponding CRW in any folder - done
« Reply #32 on: 05 / March / 2008, 12:58:12 »
Thanks Barney. Yes, I always say: "Some of these days I will tune my CHDK configuration, let's wait until developers stop making all this new changes" AHAAA!!

"This is like painting the Forth Bridge."
This expression reffers to a big red bridge we have here similar to the Golden Gate. They are always painting it to protect it from salted water. The legend claims that whenever they finish painting, it is time to start again from the beginning. It's and endless job.

I have several SD cards, some for photography and some for testing.

Re: Erase JPG along with corresponding CRW in any folder - done
« Reply #33 on: 05 / March / 2008, 13:11:53 »
Deleted
« Last Edit: 22 / April / 2008, 12:57:42 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Erase JPG along with corresponding CRW in any folder - done
« Reply #34 on: 05 / March / 2008, 13:25:40 »
hm, sorry to say that, but my a620 dies when i boot your firmware. blue led lights up briefly, then cam shuts down. i guess this is having to do with ram (same happened to s3is builds last time). you can find out more about it here: Remaining RAW+JPG shots + filespace icon/text- done :D (and following post).
my guess, at least :)

edit: btw, the diff is so small in size, you can attach it directly in your post next time, please :)

*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
Re: Erase JPG along with corresponding CRW in any folder - done
« Reply #35 on: 05 / March / 2008, 14:04:08 »
Thanks PhyrePhox. I made the changes suggested by GrAnd and uploaded a new build to the link above.

I hope more users can test this in different models to see if this is a problem with the A620 or is a problem with all non-S3_IS cameras.

I uploaded the diff file to zshare because you can only show four files in this forum. In fact, originally I had 6 photos.

For the record:
The changes where made in \platform\a620\sub\100f\Makefile.inc
MEMISOSTART=0x9F990           >             MEMISOSTART=0xAF990
MEMISOSIZE=0x30000              >             MEMISOSIZE=0x40000


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Erase JPG along with corresponding CRW in any folder - done
« Reply #36 on: 05 / March / 2008, 14:17:15 »
hm, same behaviour.
i will append your diff to my local version to see if memory is the issue here.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Erase JPG along with corresponding CRW in any folder - done
« Reply #37 on: 05 / March / 2008, 15:18:07 »
argh, just lost an hour figuring out why i cant compile your changes in a freshly exported svn trunk. turns out official trunk is broken since #316.
see error compiling chdk since #316
« Last Edit: 05 / March / 2008, 15:29:27 by PhyrePhoX »


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Erase JPG along with corresponding CRW in any folder - done
« Reply #38 on: 05 / March / 2008, 16:12:22 »
i applied your diff to a fresh export of #314 (by the way #319 fixed the issue i reported) and it compiled fine, and also boots fine on my a620. i didnt touch the memory stuff. so there must be something wrong in your environment, wontolla. as i see it, MEMISOSIZE doesnt have to be resized, at least not for a few more builds.

on the other hand: your feature works,nice! maybe enable it so you can use it in the root folder as well, not only when you mark the dcim folder (that was my mistake at first).
another suggestion: when finished, generate a popup stating the number of raw files purged, will make debugging and using easier.

*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
Re: Erase JPG along with corresponding CRW in any folder - done
« Reply #39 on: 06 / March / 2008, 10:34:45 »
Thanks PhyrePhox.
Now we know my code is not the problem but my builds. I'm clueless about the process of building for all cameras, I will open a new thread to ask for advice.

Come on people! All the links have been downloaded at least one time. At least comment if you could load it in your camera or not. If the function is working or not. You can do it in just one sentence!

Quote
on the other hand: your feature works,nice! maybe enable it so you can use it in the root folder as well, not only when you mark the dcim folder
Originally it was like that, but I wanted to limit the execution of "Purge RAW" to avoid possible problems. It is not supposed to be called in the CHDK folder is it? It wouldn't cause any harm (there are no RAW files in there duh!) but I am trying to make sure people KNOW what they are doing before executing it.

Quote
another suggestion: when finished, generate a popup stating the number of raw files purged, will make debugging and using easier.
That is a very good idea, a simple counter will do the trick. May be also displaying the amount of memory claimed just for fun!
I was thinking on display the RAW files to be purged BEFORE the actual deleting. But that requires a two-pass process: One to count the RAW files found and the other to do the erasing.

 

Related Topics