You are not logged in.

#1 2008-05-23 15:14:44

pfreire
Member
From: Portugal
Registered: 2008-05-12
Posts: 29

Idea - image compression on makepkg

Hello,

I was thinking after checking that we waste some space in packages due to bad PNG and maybe JPG compression. How hard would it be to implement some directive on makepkg.conf to do something to optimize compression on images?

suggested tools since they implement lossless compression:
- advpng
- jpegtran

I can already do something about it, but it would be nice to have it on makepkg:

find . -name "*.png" -exec advpng -z -4 {} \;

What do you think?

Last edited by pfreire (2008-05-23 15:15:42)

Offline

#2 2008-05-23 15:34:13

SpookyET
Member
Registered: 2008-01-27
Posts: 410

Re: Idea - image compression on makepkg

Bad idea. They generally further compress by removing metadata. I want my metadata.

Offline

#3 2008-05-23 15:48:03

pfreire
Member
From: Portugal
Registered: 2008-05-12
Posts: 29

Re: Idea - image compression on makepkg

You must be referring to JPG files, PNG files compress a lot more and they don't lose metadata. But as I said this would be completely optional for your own packages (specially oriented to those documentation directories with a lot of png's).

Last edited by pfreire (2008-05-23 15:50:31)

Offline

#4 2008-05-23 15:58:41

bwalk
Member
Registered: 2007-03-21
Posts: 177

Re: Idea - image compression on makepkg

In a world where the prize for disk space is at 0.15€ and everybody and their mother having broadband I have one question: why?

Offline

#5 2008-05-23 16:04:24

pfreire
Member
From: Portugal
Registered: 2008-05-12
Posts: 29

Re: Idea - image compression on makepkg

That's how microsoft always think. If you save some ms in reading some data you are  improving performance of your system. It may not mean a thing to you but this is crucial for instance in a pocket pc, were I could really improve performance on some of my uses.

Well, forget it.

Offline

#6 2008-05-23 16:18:52

SpookyET
Member
Registered: 2008-01-27
Posts: 410

Re: Idea - image compression on makepkg

doc files are generally stripped.

Offline

#7 2008-05-23 17:59:06

oliwer
Member
From: Paris
Registered: 2007-06-30
Posts: 153
Website

Re: Idea - image compression on makepkg

Do you have some packages in your mind that could use some image optimization ?

Offline

#8 2008-05-23 18:16:05

pfreire
Member
From: Portugal
Registered: 2008-05-12
Posts: 29

Re: Idea - image compression on makepkg

Many KDE applications (digikam, krusader, etc) use a lot of PNG so there you'll find the best results. KDE documentation uses a lot of PNG's as well.

Offline

#9 2008-05-23 21:44:54

Redroar
Member
Registered: 2008-03-17
Posts: 200

Re: Idea - image compression on makepkg

bwalk wrote:

In a world where the prize for disk space is at 0.15€ and everybody and their mother having broadband I have one question: why?

Because not everyone has 0.15€/GB to spend on disk space, and not everyone has broadband...I don't have broadband, can't get it where I live. Satellite's too expensive for the meager speed you get out of it. So I have dial-up. It works....slowly. But when someone suggests something that takes 15-20 minutes off of a download (for me), that's a real help. Why waste disk space and bandwidth when there is no reason to?


Stop looking at my signature. It betrays your nature.

Offline

#10 2008-05-23 22:26:58

dunc
Member
From: Glasgow, UK
Registered: 2007-06-18
Posts: 549

Re: Idea - image compression on makepkg

Indeed. And even with broadband, many people have usage limits. Every little saving on bandwidth helps, although I'm not sure image compression is the place to start.

(It might be for the web in general, but not Arch packages.)


0 Ok, 0:1

Offline

#11 2008-05-23 22:52:32

Redroar
Member
Registered: 2008-03-17
Posts: 200

Re: Idea - image compression on makepkg

True, it would probably be more trouble than it's worth (10 more minutes downloading vs 1 hour debugging botched .pngs), but I still like to see when people care enough to want to make it more accessible. Even for us poor souls who can't get broadband.


Stop looking at my signature. It betrays your nature.

Offline

#12 2008-05-24 07:55:10

scj
Member
From: Sweden
Registered: 2007-09-23
Posts: 158

Re: Idea - image compression on makepkg

I would suspect that the actual size reduction would be negligible, but it would be fairly simple to try it out to compare the sizes on some image heavy packages for anyone who is interested.

Offline

#13 2008-05-24 10:06:07

11010010110
Member
Registered: 2008-01-14
Posts: 284

Re: Idea - image compression on makepkg

We may split packages and move the unnecessary images out

This includes stuff like icon themes and wallpapers and any other graphic that is not important

If Arch has something like USE = " . . . ." in Gentoo then we may make use of it there




Like we have Kdemod on a separate mirror with packages named kdemod-* we may build a mirror for graphics - reduced packages

Users with slow connection will install their DE from there. Anyway the bottle neck will be in their connection and not the server so few mirrors will do

If they want to add graphics to some package they may uninstall it and install the standard package instead

Offline

#14 2008-05-24 10:37:13

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Idea - image compression on makepkg

It's not worth the complexity. Additionally, bigger gains could be made elsewhere, like an overall format change.

We've already discussed that other compression formats are better than .gz, but we dont use them because they're either too slow (bz2), or aren't supported by libarchive (some format discussed on ml that I have forgotten).

Pacman will accept whatever libarchive accepts.

Last edited by iphitus (2008-05-24 10:37:30)

Offline

#15 2008-05-24 15:14:42

pfreire
Member
From: Portugal
Registered: 2008-05-12
Posts: 29

Re: Idea - image compression on makepkg

I agree there are bigger gains for instance using lzma as I did before (I was using my own distro before, using tukani pkgtools and crux ports) but it takes a little more time to build the packages. I guess libarchive still does not support it although I've read about some patches to do it...

Using advdef -z filename.pkg.tar.gz -4 will improve the compression ratio on packages (about 3% in average I think)

Last edited by pfreire (2008-05-24 16:41:46)

Offline

#16 2008-05-27 19:01:05

catwell
Member
From: Bretagne, France
Registered: 2008-02-20
Posts: 207
Website

Re: Idea - image compression on makepkg

Bad images is an upstream problem. Just send them bug reports if you think they don't compress like they should.

Offline

Board footer

Powered by FluxBB