UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Submit Patch #4658 Strip jpgs from unnecessary tags & other tex optimizations
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Submit Patch
  • Category
    Artwork
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    4. Useful
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (1)
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/patches/531 Item 531] imported from sourceforge.net tracker on 2013-01-28 20:43:43

There is a lot of unnecessary information attached to many of our jpgs especially in the models/soldiers folder, but also in other folders. We can save a lot of space & optimize loading times by stripping this information from the files...
Here is an example what that would meann filesizewise (this is just the soldiers/female folder):
-----------------------------------------------------------------
Date: Mittwoch, 28. April 2010
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\body.jpg
No changes necessary
18.078 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\body_arctic.jpg
No changes necessary
68.186 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\body_cccp.jpg
No changes necessary
50.551 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\body_desert.jpg
No changes necessary
17.618 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\body_jungle.jpg
No changes necessary
17.814 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\body_yellow.jpg
No changes necessary
31.768 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head01.jpg
No changes necessary
5.504 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head01b.jpg
No changes necessary
9.253 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head01b_arctic.jpg
No changes necessary
9.314 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head01b_desert.jpg
No changes necessary
9.105 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head01b_jungle.jpg
No changes necessary
9.327 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head01b_urban.jpg
No changes necessary
9.201 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head01_arctic.jpg
No changes necessary
8.916 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head01_desert.jpg
No changes necessary
7.016 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head01_jungle.jpg
No changes necessary
7.199 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head01_urban.jpg
No changes necessary
7.105 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head02.jpg
No changes necessary
11.340 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head02_arctic.jpg
No changes necessary
12.784 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head02_desert.jpg
No changes necessary
10.788 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head02_jungle.jpg
No changes necessary
10.904 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head02_urban.jpg
No changes necessary
10.767 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head03.jpg
No changes necessary
14.453 bytes
-----------------------------------------------------------------
C:\UFOAI-2.3-dev\base\models.orig\soldiers\female\Strip\head04.jpg
No changes necessary
7.434 bytes
-----------------------------------------------------------------
23 Total files processed
0 Files renamed
0 Files successfully processed
0 Errors
23 Files needed no changes
364.425 Bytes processed
0 Bytes saved

Elapsed Time: 00:00:00

This reduced filesize for that folder from 1.38MB to 1.24MB without changing anything (!) in-game just by stripping unnecessary exif, xmp & iptc tags from the files...
There is no patch attached yet. Waiting for a 'Go for it.'

We could also reduce filesizes & loading times dramatically if we change the color palettes of many of the textures, which do not need that many colors...
I am currently searching for a tool which is able to convert pngs not only to 1, 2, 4, 8, 24 & 48 bit, but also to 12 bit (4096 colors) & 16 bit (65536 colors).
That would allow us to use high-quality lossless png textures with smaller sizes than our current artifacts riddled jpgs...
But for many of the textures even 8 bit (256 colors) would be enough, although 256 colors are really not much, that is why I think 12 & 16 bit would be ideal for many of our textures...
If someone knows a tool that can create 12 or 16 bit pngs, please shout out loud here !
===== Comments Ported from Sourceforge =====

====== mcr2010 (2010-04-28 08:16:43) ======

I need just a 'Yes' or 'No' here (for stripping jpg tags), so I will set the priority rather to high...
====== tlh2000 (2010-04-28 09:58:16) ======

loading times != file size - if we use palettized images we will in fact increase the loading times, as they must be converted into the opengl image format (32bit rgba in most of the cases)
====== tlh2000 (2010-04-28 10:07:24) ======

removing exif and co should be possible with imagemagicks
====== mcr2010 (2010-04-28 10:10:45) ======

Sorry, but filesize=loading times. & 2+2=4 not 5, I know that for sure... ;)

Another thing is the conversation afterwards. I do not know how long this takes & have not thought about that. So I will stay with rgba 32 bit.

Again I made the mistake & put two different things in one request.
What about the unnecessary tags ?
I see you answered that one already.
====== tlh2000 (2010-04-28 19:29:41) ======

ok - i'm counting the conversion to the final format we need it in to the loading time. if you don't, then you are right, but having a palettized image in the memory doesn't help us :-P

the exif headers are now all removed btw. - that's why i close this, thanks a lot for pointing this out.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif