Set resolution. Bulk
This discussion is connected to the gimp-docs-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Set resolution. Bulk | Kolbjørn Stuestøl | 27 May 10:41 |
Set resolution. Bulk | Marco Ciampa | 27 May 17:41 |
Set resolution. Bulk | Ulf-D. Ehlert | 27 May 18:36 |
Set resolution. Bulk | Kolbjørn Stuestøl | 27 May 19:49 |
Set resolution. Bulk | Ulf-D. Ehlert | 28 May 11:08 |
Set resolution. Bulk | Kolbjørn Stuestøl | 28 May 17:24 |
Set resolution. Bulk | Ulf-D. Ehlert | 28 May 18:52 |
Set resolution. Bulk | Kolbjørn Stuestøl | 29 May 15:45 |
Set resolution. Bulk
Running "tools/check_image_resolution.sh" I found lots of images not
having the required 144 resolution. Is there a way to set the resolution
to 144 dpi in bulk? Something like "set-image-resolution 144 144 DIR".
(Perhaps just one "144". I was thinking of x and y resolution, but in
this case they will be the same). "DIR" is of course the path to my
image files.
A program checking all images in the given path and if resolution is not
144x144 set it to these values.
In my copy of gimp-help-2 running "tools/check_image_resolution.sh images" resulted in "Suspects: 951". So such a program would be useful to more people than me.
2: Is there a command adding these files in mass before committing them? It is annoying writing "git add ..." dozens of times. Something like "if file changed git add image" or ""if file changed later than [timestamp] git add image".
Kolbjoern
Set resolution. Bulk
On Sun, May 27, 2012 at 12:41:54PM +0200, Kolbjrn Stuestl wrote:
Running "tools/check_image_resolution.sh" I found lots of images not having the required 144 resolution. Is there a way to set the resolution to 144 dpi in bulk? Something like "set-image-resolution 144 144 DIR". (Perhaps just one "144". I was thinking of x and y resolution, but in this case they will be the same). "DIR" is of course the path to my image files.
A program checking all images in the given path and if resolution is not 144x144 set it to these values.In my copy of gimp-help-2 running "tools/check_image_resolution.sh images" resulted in "Suspects: 951". So such a program would be useful to more people than me.
Maybe with Imagemagick?
http://www.imagemagick.org/Usage/resize/#resample
sorry, I'm in a hurry... try it & tell me if it could do the job for you...
Marco Ciampa +--------------------+ | Linux User #78271 | | FSFE fellow #364 | +--------------------+ _______________________________________________ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Set resolution. Bulk
On Sun, May 27, 2012 at 07:41:25PM +0200, Marco Ciampa wrote:
On Sun, May 27, 2012 at 12:41:54PM +0200, Kolbjrn Stuestl wrote:
[...]
Maybe with Imagemagick?
http://www.imagemagick.org/Usage/resize/#resample
sorry, I'm in a hurry... try it & tell me if it could do the job for you...
$ convert -units PixelsPerInch -density 144x144 INFILE OUTFILE
or
$ mogrify -units PixelsPerInch -density 144x144 FILE ...
should do the trick.
But if you change/fix the resolution, you should also consider optimizing PNG files with optipng or pngcrush.
Ulf
Die Erfindung der Snde war eine groe Snde wider die Menschheit. -- Michael Schmidt-Salomon _______________________________________________ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Set resolution. Bulk
Den 27.05.2012 20:36, skreiv Ulf-D. Ehlert:
On Sun, May 27, 2012 at 07:41:25PM +0200, Marco Ciampa wrote:
On Sun, May 27, 2012 at 12:41:54PM +0200, Kolbjrn Stuestl wrote:
[...]
Maybe with Imagemagick?
http://www.imagemagick.org/Usage/resize/#resample
sorry, I'm in a hurry... try it& tell me if it could do the job for you...
$ convert -units PixelsPerInch -density 144x144 INFILE OUTFILE or
$ mogrify -units PixelsPerInch -density 144x144 FILE ...should do the trick.
But if you change/fix the resolution, you should also consider optimizing PNG files with optipng or pngcrush.
Ulf
Thank you both.
$ mogrify -units PixelsPerInch -density 144x144 path/folder/*.png did the trick. It changed the image resolution for all images in the folder.
Running ImageMagick from the command line worked much the same.
(I spent a couple of hours trying to find a way to run Imagemagick from PHP, but did not find the correct installation. Ie. how to set up PHP to recognize Imagemagick).
Now I am waiting for a rainy day to experiment a bit further wit Imagemagick. :-)
Kolbjoern
gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Set resolution. Bulk
On Sun, May 27, 2012 at 09:49:25PM +0200, Kolbj�rn Stuest�l wrote:
$ mogrify -units PixelsPerInch -density 144x144 path/folder/*.png did the trick. It changed the image resolution for all images in the folder.
Attention:
If I remember correctly, only images with a certain minimum
size (especially screenshots) should be converted this way, but not
tiny images like icons.
Ulf
Set resolution. Bulk
Den 28.05.2012 13:08, skreiv Ulf-D. Ehlert:
On Sun, May 27, 2012 at 09:49:25PM +0200, Kolbj�rn Stuest�l wrote:
$ mogrify -units PixelsPerInch -density 144x144 path/folder/*.png did the trick. It changed the image resolution for all images in the folder.
Attention:
If I remember correctly, only images with a certain minimum size (especially screenshots) should be converted this way, but not tiny images like icons.Ulf
I have not tried the command on small images.
But another (little) warning:
The command
$ mogrify -units PixelsPerInch -density 144x144 images/nn/tutorials/*.png
changed all the images in that folder. So when running
$ git add -u images/nn/tutorials
all the image files in this folder was added.
Instead of push'ing about 40 files I uploaded 430 files in total. It doesn't matter, but wasted time and bandwith :-) Is there a command checking the resolution and then only change the images that are not 144x144?
Kolbjoern
Set resolution. Bulk
On Mon, May 28, 2012 at 07:24:55PM +0200, Kolbjrn Stuestl wrote:
I have not tried the command on small images.
It will work, of course, but these images may be too small in PDFs.
But another (little) warning:
The command$ mogrify -units PixelsPerInch -density 144x144 images/nn/tutorials/*.png
changed all the images in that folder. So when running
$ git add -u images/nn/tutorials
all the image files in this folder was added.
Instead of push'ing about 40 files I uploaded 430 files in total. It doesn't matter, but wasted time and bandwith :-) Is there a command checking the resolution and then only change the images that are not 144x144?
We can add a new script based on tools/check_image_resolutions.sh.
Wait for another rainy day? ;)
Ulf
Pleonasmus: scheinheilig. -- Karlheinz Deschner _______________________________________________ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Set resolution. Bulk
Den 28.05.2012 20:52, skreiv Ulf-D. Ehlert:
On Mon, May 28, 2012 at 07:24:55PM +0200, Kolbjrn Stuestl wrote:
I have not tried the command on small images.
It will work, of course, but these images may be too small in PDFs.
I understand.
But another (little) warning:
The command$ mogrify -units PixelsPerInch -density 144x144 images/nn/tutorials/*.png
changed all the images in that folder. So when running
$ git add -u images/nn/tutorials
all the image files in this folder was added.
Instead of push'ing about 40 files I uploaded 430 files in total. It doesn't matter, but wasted time and bandwith :-) Is there a command checking the resolution and then only change the images that are not 144x144?
We can add a new script based on tools/check_image_resolutions.sh.
Would be useful. Just checked. There are 863 "suspected" (wrong resolution) files of total 5815 image files left.
Wait for another rainy day? ;)
:-)
Kolbjoern
Ulf
gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list