hello dear Digikam-users, pretty new to Digikam and also to this mailinglist. i run Digikam on a OpenSuse 12.1 - i have a bunch of photos that i want to show in a image slider on the Web. They images have the following data size: 3,2 MiB size in pixel: 4 603 x 3 072 (14.16Mpx) to get a size that can be processed and shown in a image-slider i need to have the images in another size. eg like the following: http://demo.vorlagenstudio.de/index.php?template=jm-news-portal i examined the size and saw that they use a individual height in the slider and a width of 760 pixel All looks nice and tidy. my question is: how can i get pictures that have this size? Note: i have alot of images - so i look for a smart way to do the processing - in order to treat many images at once. if i have to explain more - do not hesitate to ask. love to hear from you - matze _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
Le 08/04/2012 13:04, Martin Kaspar a écrit :
> i have a bunch of photos that i want to show in a image slider on > the Web. > > two ways: in digikam export to html, you get the right images (and other file you may discrad) or better, use a scrit like mine: for I in *.jpg ; do convert -resize 800x600 $I $I ; echo -n "." ; done jdd _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by Martin Kaspar
On Sunday 08 April 2012 13:04:55 Martin Kaspar wrote:
... > eg like the following: > http://demo.vorlagenstudio.de/index.php?template=jm-news-portal > i examined the size and saw that they use a individual height in the > slider and > a width of 760 pixel > > > All looks nice and tidy. > > my question is: how can i get pictures that have this size? Note: i have > alot of images - so i look for a smart way to do the processing - in order > to treat many images at once. > openSuse 12.1). This is a set of comand line utilities that has the possibility (among many others) to resize images to fit a given height or width. (if you have the package installed, try 'man convert' in a console window, or have a look at the on-line documentation). If you want to use Digikam, that would be a job for the batch queue. I'm not sure if the resize tool there allows you to adjust images to fit for one dimension, or if it just forces the image to the new size regards Remco _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by jdd@dodin.org
On Sunday 08 April 2012 12:46:33 jdd wrote:
> Le 08/04/2012 13:04, Martin Kaspar a écrit : > > > i have a bunch of photos that i want to show in a image slider on > > the Web. > or better, use a scrit like mine: > > for I in *.jpg ; do > convert -resize 800x600 $I $I ; > echo -n "." ; > > done Just be aware that that script, as written, overwrites the original file, which might not be what you want Remco _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by Martin Kaspar
Use the batch tool to resize your images; You can choose the destination folder, and rename the output picture to your liking with many provided functions.
Marie-Noëlle 2012/4/8 Martin Kaspar <[hidden email]>
-- Mes dernières photos sont dans ma galerie. Retrouvez-moi aussi sur mon blog. Et parcourez les Cévennes à ma façon avec Cévennes Plurielles, _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by jdd@dodin.org
hello dear list, hello dear Remco many thanks for the quick reply. i had a quick look at the machine - i have the necessary libraries to performe the little script you suggested . ssee here the preliminary - i have the following preliminary things on my machine. martin@linux-wyee:~> rpm -qf $(which convert) ImageMagick-6.7.2.7-5.1.3.i586 martin@linux-wyee:~> but this script does not run - as target and sourcde are the same. for I in *.jpg ; do convert -resize 800x600 $I $I ; echo -n "." ; well - if all the files are in one folder - how should i re-design the script. there have to be different names - ohterwise convert or bash will be complaining.. can you help out here - note: all the files are in the same folder look forward to hear from you greetings matze On Sun, Apr 8, 2012 at 2:09 PM, Remco Viëtor <[hidden email]> wrote:
_______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
You should still be able to use his script with one slight modification.
So you can do this two ways. Though I use the zsh shell which is quite similar, you likely use the bash shell, which is the default for nearly every Linux distribution. Way #1: for I in *.jpg ; do convert -resize 800x600 $I ${I%.jpg}_resized.jpg ; echo -n "." ; done Way #2 for I in *.jpg ; do convert ${I} ${I%.jpg}_resized.jpg ; done I usually do this on a single line which is why I showed the second one :-) Note the change. The second $I becomes ${I%.jpg}_resized.jpg -- the %.jpg is the part that tells bash that the part of the filename that follows the % should be removed and then what follows the } will be added. Thus the .jpg in the first filename becomes _resized.jpg in the second one: DSCN_20120310T193618.jpg DSCN_20120310T193618_resized.jpg I tested this and it works. Note how useful this is :-) You can convert from one type of file to another: ${I%.tif}.jpg Do bulk convert modifications for resizing, gamma correction, saturation mods to a group of files. The nice thing here is that you get to keep the first set of files unmodified if you add the }_modified.ext for each pass. It's usually good to keep the original unmodified files in case something goes awry. And things will go awry. Hope this helps. In case you wonder, for the zsh shell the command to resize is: for i in *.jpg ; do convert -resize 800x600 ${i} ${i:s/.jpg/_resized.jpg/} ; done This follows very closely conventions in the vi(m) editor where s/x/y/ is the search/replace command: s/what_to_find/change_what_to_this/ Guy On 04/08/2012 06:28 PM, Martin Kaspar wrote: > > hello dear list, hello dear Remco > > many thanks for the quick reply. > > i had a quick look at the machine - i have the necessary libraries to > performe the little script you suggested . > > ssee here the preliminary - i have the following preliminary things on > my machine. > > martin@linux-wyee:~> rpm -qf $(which convert) > ImageMagick-6.7.2.7-5.1.3.i586 > martin@linux-wyee:~> > > > but this script does not run - as target and sourcde are the same. > > > for I in *.jpg ; do > convert -resize 800x600 $I $I ; > echo -n "." ; > > > well - if all the files are in one folder - how should i re-design the > script. > there have to be different names - ohterwise convert or bash will be > complaining.. > > can you help out here - > note: all the files are in the same folder > > > look forward to hear from you > > greetings > matze > > > > On Sun, Apr 8, 2012 at 2:09 PM, Remco Viëtor <[hidden email] > <mailto:[hidden email]>> wrote: > > On Sunday 08 April 2012 12:46:33 jdd wrote: > > Le 08/04/2012 13:04, Martin Kaspar a écrit : > > > > > i have a bunch of photos that i want to show in a image slider on > > > the Web. > > > or better, use a scrit like mine: > > > > for I in *.jpg ; do > > convert -resize 800x600 $I $I ; > > echo -n "." ; > > > > done > > Just be aware that that script, as written, overwrites the original > file, > which might not be what you want > > Remco > _______________________________________________ > Digikam-users mailing list > [hidden email] <mailto:[hidden email]> > https://mail.kde.org/mailman/listinfo/digikam-users > > > > > _______________________________________________ > Digikam-users mailing list > [hidden email] > https://mail.kde.org/mailman/listinfo/digikam-users -- "There is only love, and then oblivion. Love is all we have to set against hatred." (paraphrased) Ian McEwan Guy Stalnaker [hidden email] _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by Martin Kaspar
hello dear guy
many thanks for the great explanation. you helped me alot and you deserve a monster congratulation- greetings matze On Mon, Apr 9, 2012 at 2:10 AM, Guy Stalnaker <[hidden email]> wrote: You should still be able to use his script with one slight modification. So you can do this two ways. Though I use the zsh shell which is quite similar, you likely use the bash shell, which is the default for nearly every Linux distribution. _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
I don't understand why you would use a script as Digikam appears to bring almost everything in a user-friendly UI.
Can you explain why you would rather go for the 'complicate' way. Marie-Noëlle 2012/4/9 Martin Kaspar <[hidden email]> hello dear guy -- Mes dernières photos sont dans ma galerie. Retrouvez-moi aussi sur mon blog. Et parcourez les Cévennes à ma façon avec Cévennes Plurielles, _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
Am 09.04.2012 10:24, schrieb Marie-Noëlle Augendre:
> I don't understand why you would use a script as Digikam appears to > bring almost everything in a user-friendly UI. > Can you explain why you would rather go for the 'complicate' way. For simpy resize I would use digikam as well, but sometimes I do more steps in a row. Is digikam able to store batch jobs as something like receipts? I never checked. Martin > > Marie-Noëlle > _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by Martin Kaspar
Þann mán 9.apr 2012 08:24, skrifaði Marie-Noëlle Augendre:
> I don't understand why you would use a script as Digikam > appears to bring almost everything in a user-friendly UI. > Can you explain why you would rather go for the 'complicate' > way. > > Marie-Noëlle > Interesting question. Myself being a GUI-dependent user, I have a handful of scripts mostly for repetitive batch conversions. Using those scripts is way faster than running all the GUI-processes (yet I have some reasonably fast machines). An example would be to resize a bunch of images for web use, when design policy has lead to fixed sizes of images. A couple of those scripts don't have equivalents in Digikam or other handy software; for example rotating AVI/MPEG movies taken on compact cameras or phones. I'd guess some people prefer scripts for more precise control over the actions taken, but there may be other reasons too. Best regards, Sveinn í Felli _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by tosca
On Monday 09 April 2012 10:24:26 Marie-Noëlle Augendre wrote:
> I don't understand why you would use a script as Digikam appears to bring > almost everything in a user-friendly UI. > Can you explain why you would rather go for the 'complicate' way. I cannot speak for Martin of course, but I use shell scripts like that usually in combination with other actions that Digikam cannot do (or that are not documented, like what the 'length' setting in the resize batch tool does exactly). And there are things that are just easier to do that way. Exemple: I want square thumbnails from rectangular images, but the exact crop isn't important. That's two steps in Digikam: downsize so that shortest size is thumbnail size, then crop to make it square. With imageMagick that's one command. And shell scripts can be stored, batch queues can't afaik... Remco _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by tosca
hello dear Marie, hello Remco,
many thanks for the replies and all your help - great experience to be here. Open Source at its very best!! ;) i can second the ideas and statements of you Remco - and besides this, i have to admit that i am brandnew to digikam. So i have to do my very first steps with Digikam and its powerful batch-programme. doing so - i try to roll back my sleeves and do some first tasks with this nicely designed interface. (moving ++100 images that i have put to a batch to another folder... But that is described in another thread. above all - i love to work with Digikam - and i try to do my best to get to know the tool well. i am glad to have imageMagic on my computer. With that i can do some nice things with some certain shell-scripts - alongside i am learning to use Digikam and the batch-programme. have a great day greetings martin On Mon, Apr 9, 2012 at 11:55 AM, Remco Viëtor <[hidden email]> wrote:
_______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by Remco Viëtor
Hello all, Some comments about these images resizing issues. (And I am another user of the ImageMagick convert program, a really powerful tool with dozens of options.) First I'd like to point out a syntax detail that may be - in my opinion - questionable in some occasions. Examples shown were : convert <source-image> -resize 800x600 <target-image> This syntax, -resize 800x600, will produce a final image with 800 pixels width and 600 pixels height, and this may be inappropriate when the original image hasn't the same aspect ratio. 800x600 is a 4:3 aspect ratio and many cameras produce 3:2 aspect ratio images. More, if the original image is in portrait orientation, 800x600 will produce a landscape orientation, with severe image distortions. The convert program can resize using a bounding box mechanism. convert <source-image> -resize '800x800>' <target-image> (The size argument must be enclosed in single quotes because of the presence of the '>' character that may upset the shell, for it's output redirection.) With that syntax, whatever the original image dimensions are, whatever the aspect ration is, 4:3, 3:2, other, and whatever the orientation is, portrait or landscape, the final result will fit into a 800x800 square, the largest dimension being scaled to 800 and the other dimension recomputed by convert to maintain the original aspect ratio. Seems to be more flexible than specifying width and height, and it prevents any kind of distortion. As for the question : > I don't understand why you would use a script as Digikam appears to bring > almost everything in a user-friendly UI. Can you explain why you would > rather go for the 'complicate' way. Well, as I said above, I'm a IM convert user. I can't speak for other users, of course, but I could say exactly the same things Remco said a little earlier, i.e. « I use shell scripts... in combination with other actions that Digikam cannot do » , « there are things that are just easier to do that way » , « shell scripts can be stored » , etc. I don't consider this to be the complicated way, but the flexible way (at least for user that are used to shell scripting). Some examples ? 1. I usually build three different versions of images (for web usage). - a standard size for web pages, e.g. -resize '600x600>' - a larger size (when implementing functions such as « Click to enlarge » and link to a larger version), e.g. -resize '1280x1280>'... - a very small size for thumbnails, e.g. -resize '96x96>'... So I need three sets of dimensions for each source image, and a shell loop is really convenient, provided output names be also rebuilt, XXX.jpg -> XXX.jpg, XXX-large.jpg, XXX-small.jpg Using a GUI based batch system would require to replay the whole processing three times, one for each dimensions set. 2. I tune outputs with different quality factors / image compression, using another convert option. E.g. convert ... -quality 96 for large images, but for smaller images or icons, -quality 75 is Ok. And this spares hosting disk space and uploading/downloading time. 3. I always remove all metadata informations from final images, convert has a -strip option. 4. I always build progressive JPEG using : convert... -interlace plane because I consider this is more pleasant for visitors having a low or medium speed ADSL connection. 5. I sometime do some decorations with -frame... options, or label images, etc. 6. Last, ImageMagick provides other tools than the convert program. I sometime use the 'montage' program to build special things such as icons images built from two pictures (twin mode). And all this can be easily made scriptable. And keeping different shell scripts under hand, ready to be run on demand is, from my point of view, really flexible. But, as always, it's nothing but a matter of taste. :) Regards, Jean-François _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
On 09/04/2012 12:54, Jean-François Rabasse wrote:
> The convert program can resize using a bounding box mechanism. > convert <source-image> -resize '800x800>' <target-image> ... Thanks! I always had difficulty understanding how to get that behaviour in convert. _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by Martin Kaspar
Le 09/04/2012 01:28, Martin Kaspar a écrit :
> but this script does not run - as target and sourcde are the same. > > > for I in *.jpg ; do > convert -resize 800x600 $I $I ; > echo -n "." ; > > > well - if all the files are in one folder - how should i re-design > the script. > there have to be different names - ohterwise convert or bash will be no error for me (cadre-resize.sh is the name of the script, I hold it in ~/bin and make it executable) - of course it convert in place, so execute it on a copy of the files: $cadre-resize.sh ................................... (one dot per file) jdd _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by tosca
Le 09/04/2012 10:24, Marie-Noëlle Augendre a écrit :
> I don't understand why you would use a script as Digikam appears to > bring almost everything in a user-friendly UI. > Can you explain why you would rather go for the 'complicate' way. why load digikam when a simple script can do the job?? jdd _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by Martin (KDE)
Presently, I think Digikam batch tool lacks the ability to memorize previous settings. But it had a lot of functions, that can be used in any order, and only for the selection that has previously been made.
It might be a good idea to ask for the implementation of recording previous settings. Marie-Noëlle 2012/4/9 Martin (KDE) <[hidden email]> Am 09.04.2012 10:24, schrieb Marie-Noëlle Augendre: -- Mes dernières photos sont dans ma galerie. Retrouvez-moi aussi sur mon blog. Et parcourez les Cévennes à ma façon avec Cévennes Plurielles, _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
Le 09/04/2012 18:43, Marie-Noëlle Augendre a écrit :
> Presently, I think Digikam batch tool lacks the ability to memorize > previous settings. But it had a lot of functions, that can be used in > any order, and only for the selection that has previously been made. > It might be a good idea to ask for the implementation of recording > previous settings. digikam is better for random selected images that script do not allow. Scripts are better for global action (whole folder) when loading digikam is unusefull jdd _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
In reply to this post by jdd@dodin.org
Because Digikam is always running when I'm working on my pictures.
Because I don't know anything about scripts, and don't see any need to learn it; I'd rather spend some more time learning how to use Digikam more efficiently. Marie-Noëlle 2012/4/9 jdd <[hidden email]> Le 09/04/2012 10:24, Marie-Noëlle Augendre a écrit : -- Mes dernières photos sont dans ma galerie. Retrouvez-moi aussi sur mon blog. Et parcourez les Cévennes à ma façon avec Cévennes Plurielles, _______________________________________________ Digikam-users mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-users |
Free forum by Nabble | Edit this page |