LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-26-2016, 04:17 PM   #1
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Rep: Reputation: Disabled
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.
 
Old 01-26-2016, 04:54 PM   #2
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-26-2016, 05:00 PM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,821
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
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.
 
Old 01-26-2016, 05:09 PM   #4
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,317

Rep: Reputation: Disabled
Most picture formats are already compressed, don't expect any further compression.
 
Old 01-26-2016, 05:15 PM   #5
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Most picture formats are already compressed, don't expect any further compression.
Galleries start from year 2008 and are getting added until now, 2016. Image sizes in the oldest ones are around 150KB and thats ok, and the newer ones have sizes of around 500KB, which is too big. It is around 5,000 galleries, and a total of around 75,000 images, so this adds up. I am also asking about it on non-Linux forums, general webmaster ones, and I will see what info I can get from there. Linux can be good, as long as Imagemagick is not bad for this. There is a lot of Windows software for it too, and if I would like to download images to separate folders I would need to pay for a program which does it, and this costs around $40 (the only one good for it, I think). Then it takes work to do everything manually, and import images to the script in less automatic way.

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.
 
Old 01-26-2016, 05:51 PM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,821
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compressing image files on the server AdultFoundry Linux - Newbie 9 10-28-2015 01:59 PM
Imagemagick text to image keirvt Linux - Software 3 02-23-2015 09:35 PM
getting image size (imagemagick) btb Linux - General 6 10-15-2013 03:39 PM
Resize Image using ImageMagick mddolloff Linux - Software 1 11-20-2004 06:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration