Pages: Prev 1 2 [3] 4 5 6 Next   Go Down
  Print  
Author Topic: Erase JPG along with corresponding CRW in any folder - done  (Read 7843 times)
0 Members and 1 Guest are viewing this topic.
Barney Fife
Hero Member
*****

Karma: +70/-225
Offline Offline

Posts: 1159



« Reply #30 on: 05 / March / 2008, 17:38:03 »

Deleted
« Last Edit: 22 / April / 2008, 17:57:20 by Barney Fife » Logged

[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
wontolla
Sr. Member
****

Karma: +35/-8
Offline Offline

Posts: 334


S3 & A720


« Reply #31 on: 05 / March / 2008, 17: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, 14:14:00 by wontolla » Logged
wontolla
Sr. Member
****

Karma: +35/-8
Offline Offline

Posts: 334


S3 & A720


« Reply #32 on: 05 / March / 2008, 17: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.
Logged
Barney Fife
Hero Member
*****

Karma: +70/-225
Offline Offline

Posts: 1159



« Reply #33 on: 05 / March / 2008, 18:11:53 »

Deleted
« Last Edit: 22 / April / 2008, 17:57:42 by Barney Fife » Logged

[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
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« Reply #34 on: 05 / March / 2008, 18: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 Big Grin (and following post).
my guess, at least Smiley

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

wontolla
Sr. Member
****

Karma: +35/-8
Offline Offline

Posts: 334


S3 & A720


« Reply #35 on: 05 / March / 2008, 19: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

Logged
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« Reply #36 on: 05 / March / 2008, 19:17:15 »

hm, same behaviour.
i will append your diff to my local version to see if memory is the issue here.
Logged

PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« Reply #37 on: 05 / March / 2008, 20: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, 20:29:27 by PhyrePhoX » Logged

PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« Reply #38 on: 05 / March / 2008, 21: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.
Logged

wontolla
Sr. Member
****

Karma: +35/-8
Offline Offline

Posts: 334


S3 & A720


« Reply #39 on: 06 / March / 2008, 15: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.
Logged
whim
Hero Member
*****

Karma: +83/-0
Online Online

Posts: 805

A620/A630/i70_sd1000


« Reply #40 on: 06 / March / 2008, 16:15:20 »

@wontolla

building for all cams is a lot easier than for single cams: 'gmake batch-zip'
however, in my experience you should always do a 'gmake batch-clean' first,
even before single cam builds.

wim
Logged

GrAnd
Developers
Hero Member
****

Karma: +76/-2
Offline Offline

Posts: 917


[A610, S3IS]


« Reply #41 on: 06 / March / 2008, 16:20:06 »

building for all cams is a lot easier than for single cams: 'gmake batch-zip'
however, in my experience you should always do a 'gmake batch-clean' first,
'gmake batch-zip' always does the 'gmake batch-clean' automatically, because it does 'gmake clean fir' for each camera.
Logged

CHDK Developer.
whim
Hero Member
*****

Karma: +83/-0
Online Online

Posts: 805

A620/A630/i70_sd1000


« Reply #42 on: 06 / March / 2008, 16:41:56 »

@GrAnd
@wontolla

I have batch files start my gmake commands, I seem to have forgotten what's in them  Grin
What I should have said was that I always do a batch-clean after

sorry,
wim
Logged

GrAnd
Developers
Hero Member
****

Karma: +76/-2
Offline Offline

Posts: 917


[A610, S3IS]


« Reply #43 on: 06 / March / 2008, 16:55:52 »

What I should have said was that I always do a batch-clean after

Yes, that's true, if your default camera is not the latest one from the batch list. But it is enough to do 'gmake PALTFORM... clean' for your camera model only, in the same time 'gmake batch-clean' is simpler to type. Smiley
Logged

CHDK Developer.
wontolla
Sr. Member
****

Karma: +35/-8
Offline Offline

Posts: 334


S3 & A720


« Reply #44 on: 06 / March / 2008, 17:27:32 »

Tanks whim and GrAnd. I did use the gmake batch-zip command in my sample builds.

It produces all the zip files for each camera and also a bunch of .FIR files.
I'm uploading the zip files as I found them (just grouped by camera model).

Should I include the other .FIR files as well? Why am I getting 2 .FIR files? One inside the zip called PS.FIR and the other in bin folder called a560-100a.FIR.
Logged
Pages: Prev 1 2 [3] 4 5 6 Next   Go Up
  Print  
 
Jump to: