Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Re: FLASH: trying to shrink size of paragraph |
| From: | Laurens van Klaveren |
| Date: | Tue, 20 Jul 1999 01:02:17 +0100 |
> At 07:55 PM 7/19/99 +0200, you wrote:
>>>> >i'm floating a big paragraph of the same two letters repeated over
>>>> >and over
>>>> >across a page in a tweened animation. flash is running extremely
>>>> >slow
>>>>
>>>> It all has to do with complexity of the image. Converting to a
>>>> non-symbol
>>>> (graphic) will not reduce the number of curves and will lose the
>>>> benefit of
>>>> fonts being stored as letter symbols in Flash.
>>an alternative [...] could be to make a bitmap image [...]
>>
>>Movement will be extremely fast, and as long as the image isn't to be scaled
>>in any way
>>
>>A bitmap image of, say, 8 colours (3-bit colour) will give perfect results
>>without any quality loss, and doesn't add significantly to the .swf
>>filesize.
>
> I am a bit skeptical about this scheme having any size or performance
> advantage over vector-based, font-based text. Do you have a working example
> comparing the two?
I tested this to convince myself and anyone interested:
(I mailed you the two resulting swf files, I suppose posting binaries to
the list won't make me much friends :-) )
I started with cutting/pasting some paragraphs of random text into
illustrator (font: arial, quite a simple one IMO)
after exporting the file in .ai format, I imported the file both in flash
(default canvas size, 550x400 pixels) and made it more or less fill the
screen. I used the object inspector to check the size of the
paragraph-object, and specified these dimensions when importing the .ai file
in photoshop.
I rendered the bitmap to an indexed colour, 8 colours (3-bit), no-dithering
image and saved it as a GIF.
I imported the gif in flash, put it in a layer on top of the "vector"
version, set the fps count to 50 and made both objects move across the
screen, from left to right, in 40 frames (could've been 50, 30 or 80,
doesn't have much influence of course, but ok, I liked 40 :-) )
I deleted the vector layer, exported the remaining bitmap layer to an swf
file, then used ctrl-z to undelete the vector layer, deleted the bitmap
layer and exported the remaining vector layer to another swf file.
the result are, surprise surprise, two (visually perfectly identical) flash
movies.
the bitmap version is 16253 bytes in size, the vector version is 15142
bytes: as I suspected, no significant difference in file size.
of course, the bitmap version gets relatively larger in size when the image
gets larger because ALL information needs to be stored, compared to the
smarter vector way of storing text (each character's definition is stored
only once, so once all characters are stored the file doesn't get much
bigger) but a "standard" readable page of text isn't large enough to make
the bitmap version much bigger in size than the vector version.
however, the most important difference between the two files is the
framerate. the bitmap version is, I guess (the movie is too short to measure
the time accurately), approximately 4 times faster than the vector version
of the movie, on my iMac "classic" (233 MHz G3).
it's not that strange: flash has to render each individual character of the
vector version and paste it to the screen, while it only has to copy & paste
a block of pixels in the bitmap version of the movie, which is much simpler
(realtime calculating/rendering/anti-aliasing compared to moving a
memory-block to the video-ram)
example files are available on request (send me private mail), if there's
much demand I'll put them online somewhere, but I think it's enough to know
about the results of my little test.
Now don't get me wrong: no-one uses flash because of it's nice way of
handling bitmapped graphics, of course not. Remember that the use of
bitmapped text has quite some limitations as I mentioned in my original mail
about this topic.
Nevertheless, it could be useful from time to time, especially now that
flash 4 stores "clean" bitmap files, to know about the pros and cons of
using these kind of workarounds.
of course, good arguments/corrections are always welcome!
Friendly greetings,
Laurens van Klaveren
------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manager
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manager
Replies
Re: FLASH: trying to shrink size of para, Marc Hoffman (Dart Frog M
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

