LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 10-28-2015, 12:11 PM   #1
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 272

Rep: Reputation: Disabled
Compressing image files on the server


I've been learning Linux from books, and I just got my first self-managed VPS server from ovh.com (https://www.ovh.com/us/vps/vps-ssd.xml).

I am configuring everything according to a website that I've found on the Internet, and I will be working on a program, which will be based on picture galleries, and this could be like 10k or 50k separate galleries, with around 15 image files per each.

These images get downloaded from xxx sponsor sites (something like NaughtyRevenue.com) by a program called Mech Bunny TGP script. Some of these image files turn out to be large in size (uncompressed, like 1.5 MB each) and it cant be this way because of bandwidth cost and download time.

For this reason, I was thinking to download them in bulk to my Windows hard drive, and compress them, but this would be taking quite a lot of time. I would need a download manager program, something to compress these files in bulk, it then would need to be uploaded to the server, and processed by the program, what takes time. Normally I can just add a list of urls, and the program will download them, and add them where they are needed there.

With this, since I am using command line Linux now, I was wondering if I could just download everything to the server, and compress selectively with the command line...

Is Linux compression (I can install whatever program would be needed, and configure it, obviously) as good as what I would get on Windows? If not, it would still make sense to use something a little worse, because it would save me a lot of time.

Can you tell me your opinion on this? Will it work and what would I use?

Thanks.
 
Old 10-28-2015, 12:16 PM   #2
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
See http://www.imagemagick.org/script/index.php
 
1 members found this post helpful.
Old 10-28-2015, 12:17 PM   #3
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Images as pictures? Pictures like jpg, png, gif, etc are already compressed using advanced algorithms designed for pictures. They cannot be compressed further using a generic compression method.
 
1 members found this post helpful.
Old 10-28-2015, 12:22 PM   #4
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
@Emerson, sure they can... They can be transformed, resized or have different compression levels (which affects the quality)...
 
Old 10-28-2015, 12:26 PM   #5
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Quote:
Originally Posted by Smokey_justme View Post
@Emerson, sure they can... They can be transformed, resized or have different compression levels (which affects the quality)...
Exactly, all this affects quality. Without compromising quality they cannot be compressed any further.
 
Old 10-28-2015, 12:28 PM   #6
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,051

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
look into imagemagick in order to change each file using better compression (worse picture quality).

its the equivalent of going from cd quality sound to mp3 compression (most people think mp3 is good enough -- not as good as the original but worth it since each file would be about 1/10th the size of the original).

most media already use huffman encoding techniques so compressing them further would be a waste of time (at most 1% further reduction). for generic text files and such i think that bzip2 compresses best (ymmv).
 
Old 10-28-2015, 12:31 PM   #7
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 272

Original Poster
Rep: Reputation: Disabled
Ok, so I am assuming that I can do everything with the ImageMagic program, that I've heard about before. Would it make sense to install the GUI on that server there, and view the images through this? Meaning, I would need to copy one of the images, see how it looks like, check how to resize it and compress it, and then apply it to like up to 5000 images from a certain site, or even more.

I know that these questions are a little basic, but I am a beginner and I dont have a general idea of how this would work. I imagine that command line would be a lot better an faster for this. But if I would install GUI there, I would need to connect to it through SSH (I read about it, it may be paid).

Edit: I can actually download an image through ftp, see how it looks, and work based on that.

Last edited by AdultFoundry; 10-28-2015 at 12:40 PM.
 
Old 10-28-2015, 12:33 PM   #8
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
@AdultFoundry.. Imagemagick is a command-line tool.. You don't need a GUI.. If I'm not mistaken, it actually doesn't have one... :P
 
Old 10-28-2015, 01:04 PM   #9
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,355

Rep: Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989
You already have a topic going on this, including an example of how to use imagemagick to compress the image files from the command line:
http://www.linuxquestions.org/questi...ls-4175557305/
 
1 members found this post helpful.
Old 10-28-2015, 01:59 PM   #10
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,051

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
Quote:
Originally Posted by suicidaleggroll View Post
You already have a topic going on this, including an example of how to use imagemagick to compress the image files from the command line:
http://www.linuxquestions.org/questi...ls-4175557305/
fyi: convert is part of the imagemagick package.
 
  


Closed Thread


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
[SOLVED] compressing files and adding files to a folder darkmouse Linux - Newbie 1 11-04-2012 07:55 PM
Compressing VOB files eplanamente Linux - Software 6 01-04-2006 12:15 PM
Mandrake and compressing files stevsom Linux - Software 1 06-06-2005 08:52 PM
compressing files master Linux - Newbie 4 03-18-2004 12:48 PM
Compressing files GtkUser Linux - Software 1 04-02-2003 07:21 AM


All times are GMT -5. The time now is 08:35 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