Compressing image files on the server (probably Imagemagick)
I am fairly new to Linux and I've never used Imagemagick directly, and I am wondering if it will make sense to compress or resize images on a Linux system / server with this program.
I am importing around 10,000 picture galleries to the server (it may be less than that, this does not matter anyway) and they will be assigned to separate folders like /contents/albums/main/200x150/3000/3001 10+ image files will be here, and like I said, I will have like 5,000 or more. I was wondering if it will be fairly easy to do compressing and possible resizing with Imagemagick or would it be better to do it by hand on Windows, one by one (this may take a lot of time). I am familiar with Linux, so I can take this path, but I am not sure whether it will be a good and possible thing to do. |
I may need to / do something like this:
1) Import all picture galleries to the server 2) Find folders which are the largest the size, above a certain acceptable level 3) Then I would need to look at these pictures, get familiar with what it is 4) Test different settings that would be the best 5) Run some kind of compressing (and possibly resizing, but not likely) commands in bulk on these files I guess it is all possible, and when I look at the list of galleries (it is actually around 5,000), it does not make sense to be doing it by hand (checking every url manualy, looking at the images / sizes, and so on). There may be other ways of doing this too, but I am not sure. Like some kind of software or some kind of feature or addon to Photoshop. Generally 5,000 image galleries with 15 images each, and not all of them are of the same size (galleries start in year 2008 and the latest one has been added now, 2016), and they are not published in the same way. |
I'm no expert but ImageMagick has various commands. The mogrify command it comes with allows for resizing (which I've done) and compression (which I've not). This can be run from command line so can be scripted. You could also script size comparisons. Scripting review of the ones above a certain size might be trickier as that would require a display to see the pictures rather than just command line.
|
Most picture formats are already compressed, don't expect any further compression.
|
Quote:
Overall, I want to do it good. It is a good site that I am working on and if everything goes as planned it will be a high traffic site. I will have more galleries like this too, from other places, so a good method of doing this, would be very good. |
While its true normal compression tools like gzip won't do much to a picture file the mogrify command will let you change things related to pixes with the -compress flag and the the quality (which affects how much detail and presumably the size in bytes) it stores with the -quality flag.
I've not done this but the following talks about it: http://superuser.com/questions/79287...-mogrify/79289 |
All times are GMT -5. The time now is 09:50 PM. |