Closed
Bug 189803
Opened 23 years ago
Closed 23 years ago
smaller images (decreased file size for various composer images)
Categories
(SeaMonkey :: Composer, enhancement)
SeaMonkey
Composer
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.4beta
People
(Reporter: brant, Assigned: jag+mozilla)
Details
(Whiteboard: [adt2] patch; needs to be checked in)
Attachments
(1 file, 1 obsolete file)
|
33.35 KB,
application/x-zip-compressed
|
Details |
I have made several images from Composer in CVS losslessly smaller
| Reporter | ||
Comment 1•23 years ago
|
||
| Reporter | ||
Updated•23 years ago
|
Attachment #112076 -
Flags: review?(composer)
Comment 2•23 years ago
|
||
I don't think composer is a real reviewer, it's just a placeholder name and I
guess nobody will take it too personal and do the review...
Do you have some numbers of the old/new file sizes?
Is the size decrease significant?
Have you tested if the transparent background is working where necessary?
-> enhancement, more specific summary
Severity: normal → enhancement
Summary: smaller images → smaller images (decreased file size for various composer images)
| Reporter | ||
Comment 3•23 years ago
|
||
The savings are typically about 33 bytes per file. Image depth, etc. are not
affected. The size change is due to removal of comments in the files that some
editors add. Few programs other than those editors display the comments, so
there is no sense in having them.
Comment 4•23 years ago
|
||
Comment on attachment 112076 [details]
smaller images
r=brade (assuming the only changes are removal of comments)
Attachment #112076 -
Flags: review?(composer) → review+
| Reporter | ||
Updated•23 years ago
|
Attachment #112076 -
Flags: superreview?
| Reporter | ||
Comment 5•23 years ago
|
||
From Status whiteboard, this apparently needs super review also. Also, I do not
have CVS commit access to the source tree so once the super review comes, could
somebody check them in. The ZIP should put the images in the correct places if
you unzip it at the root of the tree.
| Reporter | ||
Comment 7•23 years ago
|
||
jag: Don't check anything in yet. I received word from another project where I
made smaller images that transparency was affected so I will have to check these.
Comment 8•23 years ago
|
||
In that directory there are 114 images; 95 of them exist in a modified version
in the attached zip file.
Previously they took up 31,333 bytes (as windows tells me), after replacing the
modified files they have altogether only 21,227 bytes.
This is more than 10,000 bytes of binary data less, which is quite good IMO (I
have to admit I was a bit sceptical when first reading this bug).
But:
Some smiley images were also reduced in pixel size, e.g. smile.gif was 17x17
pixel large, now is 15x15 pixel large.
Only transparent background was removed, but might this change trigger problems
(with alignment or something)?
Unfortunately I don't know where in composer they are used...
Second problem: transparency. This seems to work with the HTML-tag icons (I
loaded www.amazon.com which shows quite a lot of them and they were ok) and also
most of the others, but smile_active.gif smile_disabled.gif and smile_hover.gif
look a bit odd...
| Reporter | ||
Comment 9•23 years ago
|
||
Andreas: Thanks for that detailed analysis. I will file a bug with the GIF
optimizer program I was using and see if I can find one that will do this in
batch without messing with transparency.
Comment 10•23 years ago
|
||
Don't give up so fast!
I found that the three files with dubious transparency already had this problem
(or feature?) in their original version, so your conversion did no bad.
Actually I could verify by dragging all of those icons into a new composer
window with colored background that transparency was not changed in any of the
files.
What *was* changed, is the size (the 15x15 thing...).
(This also has reduced filesize most (about 500 bytes per icon) while removing
comments has only decreased file size by 33 bytes each.)
And for telling if that could be I problem I have to know how/where these
smileys are used in composer. Lxr tells me that they are only referenced in
EditorExtra.css for "the smiley menu" but also mailnews uses some of them for
composing html mails via editorSmileyOverlay.xul.
But that does work well and the reduced pixel size isn't about to make problems
(as opposed to larger pixel size which could push elements somewhere generally).
Worries about future use are also not necessary, because people have to deal
with the size of these icons anyway, no matter what it is.
Compressed comm.jar size is decreased by about 6 kB (0.64%) with the new images
(using WinZip, max. compression).
All in all I personally think taking the new gifs is safe and recommended.
| Reporter | ||
Comment 11•23 years ago
|
||
Andreas, since you are using the smaller images, those smilies can be accessed
via the HTML compose bar I think. I have sent a message to the program maker
anyway. Also, rereading the documentation for the image optimizer, I think it
also removes unused colors from the color pallete.
If you don't end up seeing any issues, you could superreview it and then I could
get 1.3b or later approval and get somebody to check it in.
Comment 12•23 years ago
|
||
Composer triage team: nsbeta1+/adt2
Whiteboard: patch; needs sr= → [adt2] patch; needs sr=
Updated•23 years ago
|
Attachment #112076 -
Flags: superreview? → superreview?(jaggernaut)
| Assignee | ||
Comment 13•23 years ago
|
||
Comment on attachment 112076 [details]
smaller images
sr=jag.
Attachment #112076 -
Flags: superreview?(jaggernaut) → superreview+
| Reporter | ||
Comment 14•23 years ago
|
||
Someone with CVS checkin privs can now check this in since it has its reviews
(after 1.3b lockdown is over of course). cvs.mozilla.org access for me in
addition to gila.mozilla.org is currently pending.
Comment 15•23 years ago
|
||
Brant, 1.3 also requires approval.
Only after that one, for 1.4a, there are no further requirements.
| Assignee | ||
Updated•23 years ago
|
Target Milestone: --- → mozilla1.4beta
Comment 16•23 years ago
|
||
Jag, now the trunk is open for 1.4a development is open can you please check
this in? Thanks.
Whiteboard: [adt2] patch; needs sr= → [adt2] patch; needs to be checked in
| Assignee | ||
Comment 17•23 years ago
|
||
I checked in all images but tag-ol.gif and tag-ul.gif. The transparent box at
the top of those images was used for alignment purposes so the tag ended up
underneath the bullet/number. Insert a bulleted or numbered list in composer and
go into html tag mode and you'll see what I mean.
Also, it looks like the s_*.gif images are unused, could/should they be removed
from the build?
What about the 19 images that didn't get replaced? Was there no gain there?
Marking this bug fixed for now to get it off my radar, please reopen it if you
want to make any of the other images smaller.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 18•23 years ago
|
||
Verifying checkin according to Tinderbox/Bonsai.
Status: RESOLVED → VERIFIED
Comment 19•23 years ago
|
||
Is there a technical reason for keeping these images interlaced ? We would gain
a few bytes per image without interlacing.
| Reporter | ||
Comment 20•23 years ago
|
||
Pascal, go for it. I'm currently setting my system back up clean so I don't
have all my tools handy at the moment.
Comment 21•23 years ago
|
||
New version of icons with interlacing option off for some images when it
resulted in a size gain
Attachment #112076 -
Attachment is obsolete: true
Comment 22•23 years ago
|
||
This is a very small gain overall (77 bytes), I deactivated interlacing only
when it resulted in a gain, for many images it had no effect or resulted in a loss.
I noticed that one of the images has a 21 colour palette (tab-ngr) while all
others have 4 to 16 colours and could be optimized.
Most of the images have more than 8 colours (usually 9), if they were set to 8
colours, we might gain a bit of weight because of the use of an 8 colour palette.
I also notice that the border of tag images is using 4 colours alone (black + 2
grays + transparency) and that the text is antialiased. Actually, I think that
anti-aliasing makes it more blur than readable ;-)
IMO 4 colour images for tag images without transparency in the corners, a simple
border and slight antialiasing would be better, we would have more readable text
and smaller gifs. The drawback being that recreating all gifs would be
time-consuming. I created two simpler tag buttons, one with 4 coulours (2
colours for the border, 2 colours for the text) and one with 3 colours (2
colours for borders 1 color for black text without anti-aliasing) and I gain
about 50 bytes per image, that would be probably between 4KB to 6KB in total.
If some people are interested, I can post examples of simplified tag images and
let you judge if this small footprint gain is worth it.
Comment 23•23 years ago
|
||
I think either this bug or bug 83774 caused smiley regression in commercial
tree. Smileys do not display in commercial tree (bugscape 22977).
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•