An external command to copy and rename selected files (to allow export to a Canon camera) ?

4 views
Skip to first unread message

antistress

unread,
Mar 21, 2009, 2:09:38 PM3/21/09
to jBrout
I own a Canon Ixus 30 (aka PowerShot SD200) digital camera and i've
just discovered the reason why i can't re-upload to my camera photos
that are handled by jBrout (re-uplaoded into the camera may be
convenient to allow displaying photos on a TV or printing directly
with a Canon Selphy printer, both without having to use a PC)

Canon cameras require :
1°) arborescence to be respected - in my case files must sit in /DCIM/
122CANON/ directory
2°) AND the name must be something like DSC2240.JPG whereas jBrout
rename files into something like
p20080615_141243.jpg (which is fine for me)

Therefore i'd like to have an external command doing this :
copy files in a temp directory
rename them DSC0001.JPG, DSC0002.JPG, DSC0003.JPG and so on

Does someone would be kind enough to help me ?

Thanks in advance

manatlan

unread,
Mar 21, 2009, 2:23:50 PM3/21/09
to jbr...@googlegroups.com
I can help you ;-)
But i'm not sure to understand your needs ... perhaps ... it's my english ;-)

"Oui, oui."
-- Shakespeare (Richard III, Acte I, Scène IV)

antistress

unread,
Mar 21, 2009, 2:32:42 PM3/21/09
to jBrout
If i use jBrout export tool to copy some selected files to a
directory, and then if i copy these files into my camera, my camera
will not detect them since files names look like p20080615_141243.jpg
instead of DSC2240.JPG

Therefore i would like to be able to copy selected files to a
directory and to rename them to match canon photos names (DSC0001.JPG,
DSC0002.JPG, DSC0003.JPG and so on)

therefore i could copy them to my camera and my camera would be able
to deal with them

On Mar 21, 7:23 pm, manatlan <manat...@gmail.com> wrote:
> I can help you ;-)
> But i'm not sure to understand your needs  ... perhaps ... it's my english ;-)
>
> "Oui, oui."
>                 -- Shakespeare (Richard III, Acte I, Scène IV)
>

antistress

unread,
Mar 21, 2009, 2:34:21 PM3/21/09
to jBrout
Also maybe i could use another tool, like pyRenamer to do that with
that rule DSC{num4+1}.JPG

manatlan

unread,
Mar 21, 2009, 3:07:15 PM3/21/09
to jbr...@googlegroups.com
g kazi fini ton script ...
tu l'auras demain, faut que je parte now

"Oui, oui."
-- Shakespeare (Richard III, Acte I, Scène IV)



antistress

unread,
Mar 21, 2009, 3:59:11 PM3/21/09
to jBrout
super merci

On Mar 21, 8:07 pm, manatlan <manat...@gmail.com> wrote:
> g kazi fini ton script ...
> tu l'auras demain, faut que je parte now
>
> "Oui, oui."
>                 -- Shakespeare (Richard III, Acte I, Scène IV)
>

François Chartier

unread,
Mar 23, 2009, 5:46:53 AM3/23/09
to jbr...@googlegroups.com
2009/3/21 antistress <thibaut...@gmail.com>


I own a Canon Ixus 30 (aka PowerShot SD200) digital camera and i've
just discovered the reason why i can't re-upload to my camera photos
that are handled by jBrout (re-uplaoded into the camera may be
convenient to allow displaying photos on a TV or printing directly
with a Canon Selphy printer, both without having to use a PC)

Is this model an old or recent one ? I don't know very well the ixus series.

 
Canon cameras require :
1°) arborescence to be respected - in my case files must sit in /DCIM/
122CANON/ directory
2°) AND the name must be something like DSC2240.JPG whereas jBrout
rename files into something like
p20080615_141243.jpg (which is fine for me)

Are you sure about these requirements ? I have a Canon camera too (a powershot A620 I believe) and have sometimes swatched SD cards with another camera (not always canon, I've done that with an HP too) and still could the the other camera's pictures while the naming was different. I think my camera images are named imgxxxx.jpg by the way.

But I believe there must be a directory naming requirement (/DCIM is certain and after I've tried some directory names which didn't work) , and also that you can't have too many pictures in the same directory.

best regards,
Francois

Frederic Da Vitoria

unread,
Mar 23, 2009, 6:00:08 AM3/23/09
to jbr...@googlegroups.com
I believe requirements vary from camera model to model. In my old S30, once a picture was transferred to the computer (using the Canon software), simply copying it back to the CF card did not make it reappear in the camera. The only way to accomplish this was to use Canon's software to thansfer the pictures back. I suppose the camera kept a index of pictures somewhere and that using the Canon software inserted the pictures in the index.

--
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org

antistress

unread,
Mar 24, 2009, 4:29:15 AM3/24/09
to jBrout
does canon software run on Linux ?

On Mar 23, 11:00 am, Frederic Da Vitoria <davito...@gmail.com> wrote:
> Le 23 mars 2009 10:46, François Chartier <chartier.franc...@gmail.com> a
> écrit :
>
>
>
> > 2009/3/21 antistress <thibaut.beth...@gmail.com>

Frederic Da Vitoria

unread,
Mar 24, 2009, 4:41:28 AM3/24/09
to jbr...@googlegroups.com
I don't know. I don't think so, since I never saw any mention of Linux on the CDs or in the documentation. But the CDs seem to contain software for Max OS X

2009/3/24 antistress <thibaut...@gmail.com>

François Chartier

unread,
Mar 24, 2009, 7:01:22 AM3/24/09
to jbr...@googlegroups.com
2009/3/23 Frederic Da Vitoria <davi...@gmail.com>

I believe requirements vary from camera model to model. In my old S30, once a picture was transferred to the computer (using the Canon software), simply copying it back to the CF card did not make it reappear in the camera. The only way to accomplish this was to use Canon's software to thansfer the pictures back. I suppose the camera kept a index of pictures somewhere and that using the Canon software inserted the pictures in the index.

Really ? that doesn't seem very foolproof...  but maybe that was to accelerate navigation and they don"t need it anymore with newer processors. There was no problem if you removed pictures directly ?

As for the Ixus 30, it has the same processor as mine (Digic II). I'm surprised it's not more flexible with the naming... I've also read pictures from a nikon finepix camera and a canon ixus with mine. They stayed on the SD card, though... no external manipulation or renaming, just different formats.

best regards,
François

Frederic Da Vitoria

unread,
Mar 24, 2009, 7:08:34 AM3/24/09
to jbr...@googlegroups.com
Le 24 mars 2009 12:01, François Chartier <chartier...@gmail.com> a écrit :
2009/3/23 Frederic Da Vitoria <davi...@gmail.com>

I believe requirements vary from camera model to model. In my old S30, once a picture was transferred to the computer (using the Canon software), simply copying it back to the CF card did not make it reappear in the camera. The only way to accomplish this was to use Canon's software to thansfer the pictures back. I suppose the camera kept a index of pictures somewhere and that using the Canon software inserted the pictures in the index.

Really ? that doesn't seem very foolproof...  but maybe that was to accelerate navigation and they don"t need it anymore with newer processors. There was no problem if you removed pictures directly ?

Yes, it was probably for speed. There was no problem when moving the pictures manually, and I was glad for that since copying the pictures through UCB 1.0 and the slow Canon interface was very slow indeed!

 
As for the Ixus 30, it has the same processor as mine (Digic II). I'm surprised it's not more flexible with the naming... I've also read pictures from a nikon finepix camera and a canon ixus with mine. They stayed on the SD card, though... no external manipulation or renaming, just different formats.

You mean that you copied files with different naming schemes to your card and the camera displayed them? Nice! Anyhow, I guess this is more camera OS related than processor related.

François Chartier

unread,
Mar 24, 2009, 7:26:13 AM3/24/09
to jbr...@googlegroups.com
2009/3/24 Frederic Da Vitoria <davi...@gmail.com>


Yes, it was probably for speed. There was no problem when moving the pictures manually, and I was glad for that since copying the pictures through UCB 1.0 and the slow Canon interface was very slow indeed!

Well, Olympus interface was no better. I'm not even installing these softwares any longer (except I did a few years ago to make panoramas, before I discovered Hugin).
 
You mean that you copied files with different naming schemes to your card and the camera displayed them? Nice! Anyhow, I guess this is more camera OS related than processor related.

Yes. And not even copied, my camera being faster at displaying images, and also that I had the TV cable, I simply inserted the SD card from the other cameras in mine and... on screen !  The DCIM directory was always there, but subdirectories were not named CANONxxx.

But I remember there were some combinations which didn't work.

But maybe it doesn't depend on the processor but the OS, you're right...
 
Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org

Totally unrelated, but are there lots of member in April ? A friend of mine is (or was)...

best regards,
Francois

Frederic Da Vitoria

unread,
Mar 24, 2009, 8:50:23 AM3/24/09
to jbr...@googlegroups.com
Le 24 mars 2009 12:26, François Chartier <chartier...@gmail.com> a écrit :
2009/3/24 Frederic Da Vitoria <davi...@gmail.com>


Yes, it was probably for speed. There was no problem when moving the pictures manually, and I was glad for that since copying the pictures through UCB 1.0 and the slow Canon interface was very slow indeed!

Well, Olympus interface was no better. I'm not even installing these softwares any longer (except I did a few years ago to make panoramas, before I discovered Hugin).

I wouldn't either, but there is one feature I want: being able to drive my camera from the PC! I seldom use it, but I want it ready just in case... The install for the S5 IS is pretty tricky: Install the default package then uninstall the useless software (picture browsers, panorama stitcher and so on...) I don't know why; I had to do this to get a functional driver.


You mean that you copied files with different naming schemes to your card and the camera displayed them? Nice! Anyhow, I guess this is more camera OS related than processor related.

Yes. And not even copied, my camera being faster at displaying images, and also that I had the TV cable, I simply inserted the SD card from the other cameras in mine and... on screen !  The DCIM directory was always there, but subdirectories were not named CANONxxx.

But I remember there were some combinations which didn't work.

But maybe it doesn't depend on the processor but the OS, you're right...

Just to be sure, I meant the capera's OS. I don't know what OS used the IXUS 30 (it isn't listed here http://chdk.wikia.com/wiki/CHDK and en.wikipedia doesn't mention OS in http://en.wikipedia.org/wiki/Canon_Ixus ), but your A620 uses VxWorks http://chdk.wikia.com/wiki/A620
 

Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org

Totally unrelated, but are there lots of member in April ? A friend of mine is (or was)...

4560 members at 13:46:48 GMT+1 ;-)


--
Frederic Da Vitoria
(davitof)

Oleg Blazhyievskyi

unread,
Mar 24, 2009, 9:09:25 AM3/24/09
to jbr...@googlegroups.com
Comment from http://code.google.com/p/jbrout/issues/detail?id=45


Just for me I've chached jbrout/db.py :

before:
def __addPhoto(self,file,tags,filesInBasket):
assert type(file)==unicode
dir,name= os.path.split(file)
try:
after:
def __addPhoto(self,file,tags,filesInBasket):
assert type(file)==unicode
dir,name= os.path.split(file)
print file
try:
it's dirty hack but it works for me, and it helps me to find images
which prevent import. But may be some one from programmers can add
something like:

if debug=True:
print file
and define dubug global variable and cli option.

Sherwood Botsford

unread,
Mar 24, 2009, 9:15:03 AM3/24/09
to jbr...@googlegroups.com


For what it's worth, some cameras can select between two modes of handling their storage.  In one mode, the camera appears just like a flash drive.  In the other mode you have to use the manufacturers software.
I ran into the is problem at a school where I taught photography.  We had one computer set up for kids
to move pix off their camera onto the network.  The last thing I wanted was to have to keep 15 different configs for reading cameras.
In some cases I was able to work around the camera's limitations.
Generally Linux and mac are better this way.  They just do the right thing when you plug a camera in.
Most flash cards are formatted as Fat32 file systems.  One of the settings in windows is whether or not to create short names (8.3) in addition to long names.  What if right now you aren't creating shortnames when you copy back to the disk? I think DIR in windows has the ability to list both short and long file names.
Possible solutions:
1.  Find a renaming program.  If you can install Perl on your computer I can hack you up a renameing program.  (Would take me about 10 minutes)
2.  Install VirtualBox.  Install linux inside VB.  Let linux talk to your camera.  This has merits anyway if
you are curious about linux.  VB is free for individual use from Sun.
3.  Get a Mac.
4.  Get DVD player that has a USB port
5.  Get a really stupid camera that still works ok to talk to your TV.
6.  Decide that it's time to trade up and get a new camera.

Oleg Blazhyievskyi

unread,
Mar 24, 2009, 9:16:35 AM3/24/09
to jbr...@googlegroups.com
Why some images have a white border, some have a black border and some
have a annoying red one. Rebuilding thumbnails has no effect to this.

May be some one know how to change border color from red to something
different.

François Chartier

unread,
Mar 24, 2009, 12:27:06 PM3/24/09
to jbr...@googlegroups.com
2009/3/24 Oleg Blazhyievskyi <oleg.blaz...@gmail.com>

As far as I know, the border color has a meaning: 
    - White is normal,
    - Black, I don't know, but
    - Red means there is a problem with metadata of the picture. Rebuilding thumbnail cannot have any effect on that.

But that might not be true any longer in recent versions of jbrout, since manatlan talked about adding a minimal set of metadata to imported pictures without metadata. So maybe you should try to reimport the images.

Else, what I can propose (and did to overcome that effect for scanned pictures) is:
- find a suitable picture with metadata and no red border (and eventually close date)
- copy the metadata of that picture to the destination pictures using "jhead" program.
- rebuild thumbnails since they have been overwritten with the one from the origin picture
- adapt dates and times of the pictures to reflect reality.

Beware though:
- if there is metadata, it will be completely overwritten (but my scanned pics had none)
- I'm not using the auto renaming features, but if you do, I wonder if importing multiple pics with the same date/time might be a problem...

best regards,
Francois
Reply all
Reply to author
Forward
0 new messages