Jump to content

JeroenM

Members
  • Posts

    127
  • Joined

  • Last visited

Posts posted by JeroenM

  1. Hi,

     

    I've got a Fujitsu-Siemens Amilo K with a Viewsonic G90f+ attached to it.

    The best and max resolution for the laptop is 1027*768.

    When I attach the monitor to the laptop it gets the same image.

    However it is a 19" monitor so I want it to be larger.

    But I can't set a higher size anywere.

    I assume this is because it might be dangerous to the laptop LCD.

     

    How can I set the resolution for the external higher?

    (without killing my LCD)

     

    thanks

     

    Jeroen

  2. aaargh!

    I'm trying to install autopano on a Mdk 10.0 Powerpack.

    I followed this explanation to install it.

    I got rpms for Mono 1.0.4 (since there's no mono-all.zip) and for gtk-sharp at this site.

    And then I get this:

     

    [root@ autopano-sift-2.1]# cd src
    [root@ src]# make bin
    mcs /debug /unsafe /target:library /out:libsift.dll \
           ImageMap.cs KDTree.cs ScaleSpace.cs SimpleMatrix.cs ImageMatchModel.cs RANSAC.cs Transform.cs LoweDetector.cs GaussianConvolution.cs KeypointXML.cs MatchKeys.cs BondBall.cs AreaFilter.cs /pkg:gtk-sharp /r:System.Drawing /r:ICSharpCode.SharpZipLib
    error CS8027: Couldn't run pkg-config: Cannot find the specified file
    make: *** [libsift.dll] Error 1
    [root@ src]#

     

    :wall::wall:

     

    [moved from Installing Mandrake by spinynorman]

  3. OK.

    looking through the manufacturers websites I found officious drivers from Epson, official drivers from HP and nothing at all from Canon except from "we do not have drivers".

    Down with Canon (for the printer).

     

    The linux-rinting.org seems to say both Epson and HP print equally good. Epson through the gimp-print and HP through their HPIJS.

     

    Spec and price-wise I'll probably go for the Epson R200 or R300.

    If anyone has one of those...?

     

    and off course: thanks all for the replies.

  4. Hi,

     

    you might remember a topic about renaming jpg-files according to their date in the header:

    http://mandrakeusers.org/index.php?showtopic=10744

     

    well, I now have a new and a little "harder" problem.

    I want to do the same for crw-files (Canon Raw files).

     

    a head of a crw-file gives me this piece of crap:

    [jeroen@jeroen landsch]$ head crw_5493.crw
    II?HEAPCCDR@ÐÐcÂ@5OGvKý8pŸ(k
                                   d>ÂϬñÀA³ÔOïâ¸ÏÝmðŽÐ0€ƒ~0H
    |û8S,€€Ô‚ƒÁsüsÄãÝ“Ì’Lé¼À úWp?Dó°Ã<DÏ4£ë‘<Ìs?ñ³«ÌÒ<ùÁ?‚ÏS¿¡BÍs+ŒC8M,ñMW=1#Ly{rn1
    ýP/!âìÂS
           bŒÍ*Añ
    ÐEñÇ6ôÒ-pÀƒàûM        Ñ?ä#ðGŒ‡QGÎÈ
    °}?ޔ˼BôãÌ
              @ÄbäáDýâÕÜ,Ò0ß’öÁ @1A¤o¸¥DqÄópG¡Äóó^ðÏL/ñ<ÈÃW=T°•#K…ËÔÀAÜb¨l
                                                                           qOµ0Ýì-È
    îÃ9|ÍC× ôsBsp#  <Õž°RU5CÉmO×
    у1W7T|ÆÈüÜ
              =ýµ?@K=ô)Cœƒ¯@@'’C'
                                  !üÒT-DrAôÃ8ÁÍ…5H
                                                   P‚ÃaÁGDP
                                                          a/$4ÃsLQÑOs=A1áÎà\=QDD<
    (k<b BýÝNà—0(¾-‰±ð½âa×õáEÿ
    ·MrÄÕàð!Á…pD­¿OÜ+ÃÄe4L?ôMñÕ
    0]ì4Á€Ósôäÿÿ×[áÀl¥ÐxLm€)\<¢¡wœ4“‚ ?7ÌZÑ–ËIÀóWÄdÿYËÁö¼{7L»þ°ÀÁ(̈»ˆÏ­h´P°òÍÀ4À(`
    _Æ8Ô[i؆ŸL ‡Wß?!øܼ“bãñaÞÌDÌ'2þ‚$³‡ÆŸÛGÓYTMOƒ2¯,XnQt¬†Ël Æ0LÇ h,μ8S±,Å
    ½¨;³ÕQÎœË$§                                                             3àð
              €Ðû?4~Ä;¬$ÍM6KÜ?|ßÆÑ ƒPGØÞ2äIY:\’ÀŽKm€D‡}TÕ)/CÿhÿFÄÄζÈÙQE3”[×K‹9"q
    ó˜ML×}@“ÖÝ;DäÑÃUPSÈÁU<BÀL|@iQ‘;1H
    ýÃÜuÁrãp                          ÄÔ¸2Ã0å+‚‘!@ÐÖe°L‚=Ep1!®@ Ít0ÒÓ4Ùg0Ì£7Îh
           ËCÜÃ
                ÕlÝ        0ˆCJWPã}pϼíÌ|CpÃî¸}©Õÿß[ÏÇô@ã¾
                                                          Qëa5\ üwÿsƒ3 Ó
    ±<ÃßÒãç>ã3'3|÷ý?<0-÷
       SBžS|Ï ÎÏL=‘ V3öÒÆÃÒ2Àô© `ÝC¡Â?X\GÀÅ󀜬ÿOOô0·?E?355pOb…‘;x{
                                                                   ÄÍÄ_ô¿bì0ñ¶œOÓŒT
    ¿TNxÝþµ,B³0Ì?‡÷P/=·ƒLÏŸ@Õ< t£6i5D7C½55Õ%Ä
                                             K
                                              }à3Ž¼3 È/8ÀsGHA$0ãþÀPHÚÙÜ tŽÀòÃPS9•
    CÀ°–ÁÐ|4„„Vìæ±Ò@¼|܃X\OÀR°s…K   Àžß
                                      0ã0-6AqëÀç0;ß."Éo]<q@L#3
                                                               ü2Aàñ~õ
    Ö3“È    1$pã    ˆb8¡`Qqñ=þ-Qäyaä?ÏÀ€35HÃcÈ                        ÌÛN
    > ÜÓ“ÏXs>Jœ!sUÞDÐË
    Ü-£ˆpÙFÐ_Ü€ý~ÇNÈÏÃ|
    ”=B@ÀÔNÑ^˜TþK<ÜTPó˜sÐÐ:ñÃAï>çÌ;öÆô°??Wó°eø؃¬1J„…{
    
    äÔ`áØ­UBGpAÄu=“„±‚¼C|!Üô\@Óü€0ïÔ÷„£¿ü<ÖŬÔCÁÌ|<·ºÌ‹
                                                       ¯ÁöÿÉ×qcVH%C¼üí@ ,üƒvÐÿ#
    ²?%\C
    Ɉþ?0Ê°BÌùr^×Àñ Ã`ô¬Î>»jñÇÛˆD¾C',þÒÛÞÀ_D7È;N¸tb»¾ƒû0Ä:ƒ:°|ûÇ
    0ñƒÅ$IË=I¯pÆ?Ï“3ÌáTÏÅVU2Î
                             }ÞÌéIÿ        ã‹S8u<Ѳö”Ì'‰ÄÀØ02ïŒÛ£#ÊÌ8Dý“÷pRÄÿ´ÝJCÿ
    s
    çÿÈ<±pb#ôóyÛ]H! àý¼Cp03³´Ðã¥|ÿâ¼àÜ“,
                                         ÏŠõßg3xsóôÀéÀ(}
                                                       ;,ôŒÎ€,qC?ÀIdœ.‡ÀÔÌ!Á¨ÐÛtù
    ôöè8Ã`þÏD´Ä¸ê9Á(.fÓ‡9TtÍW
                             Çñ >ådÐÌýO?Np®á‘Á¿åWqƒ3ð3ÿgô‘žÇ5      ¿KÎÒÌñ‚0×8PÚxtx¤
    3v2u×Dp'áa°3¯ÇÍ„2SXl<E?|W÷œ5Ì$8A,‰Aó3?Õ?¡
    
                                            <;MÅ¢ñ|v14Ü°—0SŸÇ3ÐÐÈn¼ÀðÍ8@$ù6¼¼âþþ3
    Õ̳O3ÐðÀ9ûZsþÇÛ
                  Cñ5Ä°ƒ©G<Ì=ÁVƒá! +`+ ¼ü¼ŽDðN>óŸÈÌÃ8”t¶¼ržÁ
                                                               ¨<ôuÀ×Áüˆ,?ûó¤8)¡Ïãë
    ²·<óëŒ&í=ã3üœ“X
                ç:̃.ž4÷ü~p       ?0?ƒ?#O´7ð”À0ñòÌ
                                                   KÏ€ôô÷òr@ÌÔ¡÷
                                                                ³Ã¤@ÀüåÏŒ|}DxÏÔLÌÅQ
    ¹Ÿ^ÇÎàÿsmH÷4£ø<nÏÛü?,±^b‡rN
            ð˜†|SðÑÚ81¯œ=}As¼
    
                              ^ÜOÓs
    Ñ
    ³ÍÍðà{…ôxT<„ƒ3ÄÀ_pÑÔN<ÝÊp?'ÛÀ(<öÌÀDçĶÛÌĤ#,:K;ÄÀÀðÿDÇs¹Ð@3Ì1øüÊL‡PØÎpG„ðŒqMÌ“
    þÀ“ò@À¨­ÀtÇÓcK0Á/# D3’0s¡›Ð—ùàCrÌ2ƶ½ŒÒ4WócËøC:þ4T7‡Îhu÷Ü
    Ï|þW70$ÈP­y<ÏÒÓª3?OðL,LMôBMµûÅCtÓaäÛG†¤C¨©Ö¬§¹›z€Kqœ±ÄyHŒxw‡Ç-±µ! ó1læÔ›Ø<ÉF̱˜¡
    õÓà^î„-ÇТ|ób]~DØ4E™Ýå¼)Ñ…qÆîJfmÑ<Þ    Â/Så§#¶Tà?±BöV¿Bij?Bìü½5U\?—°<JãDÍþ„ÛÊä
    ÖHMm›\!Ù´t+-,SñÑ        sž›ÃÝ…)ñ¬èKoìéÚÿóC³Ù0ƒ;p6üm¨HV5™œ?õ1mS^­ÀXóð‘‹6~ióõ–ès§Æ
    Z¸cÅýQj8넱‘¢GÇåÿB"î#…ðNÒÃe‘FÁ•4ñWÎ4wwáÀò³yr:E˜àžî
            vgpUˆù<ŽYÁ$6åâ§Pñ÷zTgÿW6?‰y¨g^S‰±ˆZ¯:ú2 ÐH7ò:—-]®|
                                                              õ
    ŸÚø¯îL… ÄŸ#sv¥ƒAºG#t¸+hó…Å?UW*‚š8ÁncË+K.ýÌ
                                             1Sµ¥Àª ÉÙ)†C~.yÇÓ2ua™/MF]Oú;&.^Úl<Ÿ

     

    So: that doesn't look nice.

    But every crw also has a thm-file which is actually just a very small jpg.

    So I can simply use the script in the other topic to rename the thm.

     

    So my question is:

    how can I modify the script so I can use the header of the thm to rename the crw (the filename are the same exept for the extension)?

     

    thanks gurus

     

    Jeroen

  5. Hi,

     

    I've got tif files which I wan't to make new jpgs of.

    This is easy:

    mogrify -format jpg -quality 100% *.tif

     

    BUT

    before this I want to sharpen them.

    This is easy:

    mogrify -unsharp 1 + 0.5 + 0.05 *.tif

     

    BUT

    my problem is I don't want to have the tifs modified.

    And this is done when I do it this way.

     

    I could of course first make jpgs and the sharpen but this increases artefacts since I save as jpg twice.

     

    So I tried some things like

    mogrify ....... | mogrify ......

    but I can't find it.

     

    Oh yes,

    I could do something like

    mkdir double
    for img in *.tif
    do
    cp $img ./double
    cd double
    mogrify -unsharp 1 + 0.5 + 0.05 $.tif
    mogrify -format jpg -quality 100% *.tif
    rm -f *.tif
    cd..
    done

    but I'm sure it can be done in just 1 line

     

    anyone???

     

    thanks

     

    Jeroen

  6. Hi,

     

    I have a Fujitsu-Siemens Amilo K7600 laptop with a DVD+RW burner, Mandrake 10 PowerPack.

    (all since last week)

    When I installed Mdk the DVD+rw worked twice (that's all I had to write with it at that time) but the CD+rw went nuts on a certain disc.

    But now the dvd+rw doesn't work anymore (same pack of disks but other discs) but the cd+rw does work (other discs, other brands but also the same brand). And I didn't even do anything.

     

    Weird stuff.

     

    I tried K3B which did fine in the beginning, I tried XCDRoast with prodvd, I tried another disc.

    I tried Nero on WinXP and it failed as well.

     

    This is my error log from K3B:

     

    System
    -----------------------
    K3b Version: 0.11.6cvs
    KDE Version: 3.2 BRANCH >= 20040204
    QT Version:  3.2.3
    
    growisofs
    -----------------------
    /dev/ide/host0/bus1/target1/lun0/cd: pre-formatting blank DVD+RW...
    :-[ FORMAT UNIT failed with SK=3h/ASC=0Ch/ACQ=80h]: Input/output error
    
    growisofs comand:
    -----------------------
    /usr/bin/growisofs -Z /dev/ide/host0/bus1/target1/lun0/cd -use-the-force-luke=notray -use-the-force-luke=tty -use-the-force-luke=dao -speed=2.4 -gui -graft-points -V K3b data project -volset  -A K3B THE CD KREATOR VERSION 0.11.6cvs (C) 2003 SEBASTIAN TRUEG AND THE K3B TEAM -P  -p K3b - Version 0.11.6cvs -sysid LINUX -volset-size 1 -volset-seqno 1 -sort /tmp/kde-jeroen/k3b8Kmasb.tmp -r -hide-list /tmp/kde-jeroen/k3bTCeGpc.tmp -l -iso-level 2 -path-list /tmp/kde-jeroen/k3bhxirWa.tmp

     

    Can anyone tell me whether my machine is broken, whether it is a faulty disc (twice), whether I don't know what...?

    :wall:

     

    thanks

     

    Jeroen

  7. I'm not sure but it might be a tip: if you search for "dvd" in the software installer there seems to be a "k3b with support for dvd" (not installed by default on my install). I guess you need that.

  8. oh, what if I have a file without a header (like after using Gimp)?

     

    hmm, I'll quickly test it and let you know.

     

    edit:

    OK, I found out.

    don't use the script for that ;-)

    and don't use the script on files which have been renamed already ;-)

    that's OK. I'll just have to take care when I use the script.

    thanks

     

    this is what I get after adding 2 files without a header and repeat the script several times (just in case you have a real urge to "fix" it):

    [jeroen@vlinder test2]$ ls
    2004-01-13+22-20-03bresave.jpg       IMG_0899.JPG  IMG_0903.JPG  IMG_0907.JPG  IMG_0911.JPG  IMG_0915.JPG
    2004-01-13+22-20-03bresaveklein.jpg  IMG_0900.JPG  IMG_0904.JPG  IMG_0908.JPG  IMG_0912.JPG  IMG_0916.JPG
    daterenamearusabal*                  IMG_0901.JPG  IMG_0905.JPG  IMG_0909.JPG  IMG_0913.JPG  IMG_0917.JPG
    IMG_0898.JPG                         IMG_0902.JPG  IMG_0906.JPG  IMG_0910.JPG  IMG_0914.JPG  IMG_0918.JPG
    [jeroen@vlinder test2]$ ./daterenamearusabal
    [jeroen@vlinder test2]$ ls
    2004-01-13+22-20-02b.jpg  2004-01-14+22-09-46b.jpg  2004-01-14+22-09-49.jpg   2004-01-14+22-09-52.jpg
    2004-01-13+22-20-02.jpg   2004-01-14+22-09-46c.jpg  2004-01-14+22-09-50b.jpg  2004-01-14+22-09-53.jpg
    2004-01-13+22-20-03b.jpg  2004-01-14+22-09-46.jpg   2004-01-14+22-09-50.jpg   2004-01-14+22-09-54.jpg
    2004-01-13+22-20-03c.jpg  2004-01-14+22-09-47.jpg   2004-01-14+22-09-51b.jpg  b.jpg
    2004-01-13+22-20-03.jpg   2004-01-14+22-09-48b.jpg  2004-01-14+22-09-51c.jpg  c.jpg
    2004-01-13+22-20-04.jpg   2004-01-14+22-09-48.jpg   2004-01-14+22-09-51.jpg   daterenamearusabal*
    [jeroen@vlinder test2]$ ./daterenamearusabal
    [jeroen@vlinder test2]$ ls
    2004-01-13+22-20-02b.jpg  2004-01-14+22-09-46b.jpg  2004-01-14+22-09-49b.jpg  2004-01-14+22-09-52b.jpg
    2004-01-13+22-20-02c.jpg  2004-01-14+22-09-46c.jpg  2004-01-14+22-09-50b.jpg  2004-01-14+22-09-53b.jpg
    2004-01-13+22-20-03b.jpg  2004-01-14+22-09-47b.jpg  2004-01-14+22-09-50c.jpg  2004-01-14+22-09-54b.jpg
    2004-01-13+22-20-03c.jpg  2004-01-14+22-09-48b.jpg  2004-01-14+22-09-51b.jpg  b.jpg
    2004-01-13+22-20-04b.jpg  2004-01-14+22-09-48c.jpg  2004-01-14+22-09-51c.jpg  daterenamearusabal*
    [jeroen@vlinder test2]$ ./daterenamearusabal
    [jeroen@vlinder test2]$ ls
    2004-01-13+22-20-02.jpg   2004-01-14+22-09-47c.jpg  2004-01-14+22-09-51.jpg   c.jpg
    2004-01-13+22-20-03.jpg   2004-01-14+22-09-48.jpg   2004-01-14+22-09-52c.jpg  daterenamearusabal*
    2004-01-13+22-20-04c.jpg  2004-01-14+22-09-49c.jpg  2004-01-14+22-09-53c.jpg
    2004-01-14+22-09-46.jpg   2004-01-14+22-09-50.jpg   2004-01-14+22-09-54c.jpg
    [jeroen@vlinder test2]$

  9. ... I can only suggest to add a ';' after the 'p' in the sed command, since there where that 'char 49' is placed (but I insist in that here it works fine (tested on debian and mandrake))

    tadaaaaaa!

    adding the ; works.

     

    [jeroen@vlinder test]$ head IMG_0899.JPG|strings|sed -n '/[0-9]\{4\}\:.*/ {s/ /+/g; s/:/-/g; s/$/.jpg/; p}'|uniq
    sed: -e expression #1, char 49: Extra characters after command
    [jeroen@vlinder test]$ head IMG_0899.JPG|strings|sed -n '/[0-9]\{4\}\:.*/ {s/ /+/g; s/:/-/g; s/$/.jpg/; p;}'|uniq
    2004-01-13+22-20-02.jpg
    [jeroen@vlinder test]$

     

    perfect!

    thanks!

     

    I'll be looking for a new challenge for you right away ;-) :thumbs:

  10. this is the script as I used it:

    #! /bin/bash
    # made by arusabal (www.mandrakeusers.com)
    shopt -s extglob # for improved file pattern matching
    for imgname in *.+(jpg|JPG);
    do
      newname="$(head $imgname|strings|sed -n '/[0-9]\{4\}\:.*/ {s/ /+/g; s/:/-/g; s/$/.jpg/; p}'|uniq)"
      # if there is already another file with the same name append an extension (b or c).
      # Just thinking a bit more this can be improved, but IMHO it will work OK:
      if ls ${newname%%.jpg}* &> /dev/null; then
          if   [ -f ${newname%%.jpg}b.jpg ]; then newname=${newname%%.jpg}c.jpg
          elif [ -f ${newname} ]; then newname=${newname%%.jpg}b.jpg
          fi
      fi
    
      mv ${imgname} ${newname}
    done

     

    I only changed a comment and renamed the script. thant can't be it, can it?

  11. Well, it looks brilliant!!!!

     

    But it doesn't work :-(

    I'm sure it's just a " " somewhere where there shouldn't be one but I don't understand anything of your script so I have no idea where to look for it.

    OK, I can use the "man" but it'll take me ages while you'll probably see it right away.

     

    Oh, about using "IMG*" instead of "*": I've got older files which have other names so I'll keep it to "*"

     

    This is what I get (added some more files to check it out):

    [jeroen@vlinder test]$ ls
    IMG_0898.JPG  IMG_0903.JPG  IMG_0908.JPG  IMG_0913.JPG  IMG_0918.JPG
    IMG_0899.JPG  IMG_0904.JPG  IMG_0909.JPG  IMG_0914.JPG  scriptaru*
    IMG_0900.JPG  IMG_0905.JPG  IMG_0910.JPG  IMG_0915.JPG
    IMG_0901.JPG  IMG_0906.JPG  IMG_0911.JPG  IMG_0916.JPG
    IMG_0902.JPG  IMG_0907.JPG  IMG_0912.JPG  IMG_0917.JPG
    [jeroen@vlinder test]$ ./scriptaru
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    sed: -e expression #1, char 49: Extra characters after command
    [jeroen@vlinder test]$ ls
    b.jpg  c.jpg  scriptaru*
    [jeroen@vlinder test]$

  12. aru, before I forget: thanks with the previous one. you're really good at this.

     

    this is the result of "ls *.jpg *.JPG":

    [jeroen@vlinder nieuwzonderbackup]$ ls *.jpg *.JPG
    ls: *.jpg: No such file or directory
    IMG_0898.JPG  IMG_0899.JPG  IMG_0900.JPG  IMG_0901.JPG  IMG_0902.JPG  IMG_0903.JPG

    here there are only .JPG files but I have .jpg files as well.

     

    and this is the result of "head IMG_0898.JPG"

    [jeroen@vlinder nieuwzonderbackup]$ head IMG_0898.JPG
    ÿØÿáþExifII*    z€?Ž(2ži‡²
                             CanonCanon EOS D30´´2004:01:13 22:20:02š‚P‚X'ˆd0210
    ‘‘8’
    @’H’
    `’h’p’  ’
    ’x|’F€†0 0100    À ֢Ƣ΢¢£2004:01:13 22:20:022004:01:13 22:20:02>÷
    -²Ð
    -²è2 :z‚Š¼
    ;È >?^
         U
          B~        vZj
    –ª@0226ÿ2’bd2 ?608`™v
                      þþêë¯þþíퟟþþêíO¯þþë쟟þþíí¯þþìíŸþþêê¯þþë럟þþíí?þþíë_oþþ
    ìê_þþëìŸþþíëŸþþìí¿þþïêþþï쀀IMG:EOS D30 JPEGFirmware Version 1.02Jeroen Men
    tenss
    
    
    ù|¦SR980100 À?Z(ô
                    ´´ÿØÿÛ„

     

    lots of crap but you'll see the date + time in it.

     

    These are the files I want to rename according to YYYY-MM-DD+HH-MM-SS.jpg and with ...b.jpg and ...c.jpg if more then one pic on that time exists (these example pics have been taken to show that behaviour)

     

    http://users.pandora.be/jeroenm/temp/IMG_0898.JPG

    http://users.pandora.be/jeroenm/temp/IMG_0899.JPG

    http://users.pandora.be/jeroenm/temp/IMG_0900.JPG

    http://users.pandora.be/jeroenm/temp/IMG_0901.JPG

    http://users.pandora.be/jeroenm/temp/IMG_0902.JPG

    http://users.pandora.be/jeroenm/temp/IMG_0903.JPG

    (about 90 kB/piece)

     

    and http://users.pandora.be/jeroenm/temp/dlallesdaterename is the full script I have so far.

     

    thank you!

  13. Hi,

     

    I'm working (with some existing scripts and some home made stuff) on my own picture database

     

    step 1: download pictures and give them a unique name

     

    this is the script I have so far. Parts of it I understand, others I don't. It needs a lot of work but it works. If you understand it I'd be very pleased to know so I can improve it to make it work more efficient.

     

    gphoto2 --camera "Canon EOS D30" --port usb: --get-all-files
    mv IMG_* /home/jeroen/D30/nieuwzonderbackup
    cd /home/jeroen/D30/nieuwzonderbackup

    this part I wrote myself :D

    I D/L my pics, move them and move the prompt with it

     

    inputfile=`ls *.jpg *.JPG`
    for imgname in $inputfile

    I understand this

     

    do
       if [ ! -f $imgname ]; then
           echo $imgname" not found."
           break
       fi

    don't understand it but it doesn't look dangerous ;-)

     

        # Extracting image information
       info=`head $imgname| strings| grep 200 | grep :`
       newname=`echo $info|cut -d ' ' -f 1`"+"`echo $info|cut -d ' ' -f 2`".jpg"
       newname=`echo $newname|sed s/:/-/g`

    I understand parts of it. from the header of the picture it takes a string,

    it cuts parts away (I think, the "cut" is a mystery for me) and adds ".jpg" (found that out myself :-) )

    the file gets renamed as follows: year-month-day+hour-minute-second.jpg

    my problem is: my camera can take 3 pictures a second so I need more then this.

    my problem is I don't understand the "cut" part so this is my "solution":

     

        #vermijden overschrijven trippel
       changefile=`ls *. jpg *.JPG`
       for changename in $changedfile
       do
           if [ $newname = $changename ]; then
    info=`head $changename| strings| grep 200 | grep :`
           newname=`echo $info|cut -d ' ' -f 1`"+"`echo $info|cut -d ' ' -f 2`"c.jpg"
           newname=`echo $newname|sed s/:/-/g`
    fi
       done
       #vermijden overschrijven dubbel
       changedfile=`ls *.jpg *.JPG`
       for changedname in $changedfile
       do
           if [ $newname = $changedname ]; then
           info=`head $changedname| strings| grep 200 | grep :`
           newname=`echo $info|cut -d ' ' -f 1`"+"`echo $info|cut -d ' ' -f 2`"b.jpg"
           newname=`echo $newname|sed s/:/-/g`
           fi
       done

    quite NOT good programming I must say. I could use some help with reducing this to something simple. also, I want "image1.jpg", "image1b.jpg" and I had to swap the "b.jpg" and "c.jpg" in the cut commands to avoid "image1.jpg", "image1c.jpg". don't get it

     

        # Rename only if valid newname
       if [ "X$newname" != "X+" ]; then
           mv -i $imgname $newname
       fi
    done
    rm -rf .input

    I get the "mv -i $imgname $newname". the rest is a mystery, especially the "rm -rf .input". is this ubiquitous?

     

    So, I have some parts of which I think "can't I just delete this?" and some unelegant parts.

    If anyone can help I'd be very happy.

    If not, my script sucks but it works (afaik)

     

    Jeroen

×
×
  • Create New...