Now, let us take a close look at our Bitmap graphics to see what is affecting there compression in the final swift file. We can look on individual settings on each graphic by selecting the graphic in the library and I am going up to the options on the library panel. That is our little line item here with the arrow and I am going to choose out of the options, properties.
This window shows as a lot of information about the graphic itself: how big it is, where it came from, but it also shows us the compression information for it. What we are saying here are the default compression settings because we did not actually do anything besides import this graphic into the library at this point. The compression is automatically set to photo jpeg that you can turn that off and set it up to a PNG/GIF file but your graphic file is going to be a lot bigger when we publish our swift movie file so I am going to leave that at jpeg. By default, all none jpeg images are set to compress to jpegs and use what is called the document default quality setting. This setting we will find right back on our publish settings so I am going to click Okay and we will go and take a look at that default quality setting. I will click away from everything in the movie and that sets up my property panel to show document settings and there is our publish settings button again. So we will just go right back there and we can see our Flash settings come up again.
If you look down the screen, we can see that part of the Flash settings are jpeg quality settings. Now that is set to 80 which is a pretty safe value for quality on a jpeg and what this means is that all images we bring into the program that are not already jpegs will be compressed at this level unless we specify otherwise. I will click Okay to close the publish setting window and let us go back and take a look at the properties of circuit3.tif.
I am going to once again go to the options panel on the library window, choose properties and this time, inside the property panel, I am going to turn off the document default quality and I can set the quality at whatever level I would like. Now, you can experiment using this one, I am going to set the quality at a ridiculously low value of ten. That should make a really tiny file but it should also create a lot of visual artifacts in the image. We can see this by clicking the test button and you will notice, it is reporting to me that it is going to compress this file down the 2K but over in this panel, we can see exactly what that will look like. And as you can probably see that is not going to be an acceptable value. This does allow however to test several values and see what is going to look good for any particular image. Let us pump this one up to about 60, I will hit test again and now you can see that the graphic looks a lot better and we are taking it down to 13K in the file now.
We will leave at that setting and let us take a look at the properties of the other graphics: circuit4.jpg. I have selected out the library, we will select properties out of the options menu and we can see the same sort of thing. This is also set to compress as a jpeg but this file is already a jpeg so by default it is set to use the imported jpeg data. Now, that is pretty important because we generally do not want to add compression on top of the file that is already compressed, we will get a lot more artifacts on our images that way. You still have the option of turning this off and setting whatever quality you want to though. The goodness for us is as you can see, the default settings for none jpeg and jpeg images are usually what you want to stick with. I am going to click Okay, we have changed the settings on our TIF file and we have also made our background graphic into a movie clip. Let us just export one more time so we can see that output window again. Choose export movie, we will ride over the original swift file so when it asks to replace it, I will just click yes and again, it is going to show me the options, I still want to leave that generates size report on and we can see the 80 compression setting on our default files.
Now, I am just going to open up the output window and I will pull up here a little bit so that we can the contents. Up at the top, we still have our last output report but now, we can look at the second output report. The first thing I will look at is the TIF file, remember we drop the quality from 80 down the 60 and that changed the image export to 9K. Now, that is pretty small. Since we left our jpeg alone, we still saying 33K for that image but now, we can see the symbol category has been added and it shows our gradient background. What we are looking at here is 48 bytes that is not even a half a K so we can definitely see the dramatic difference between using vector graphics in your file versus bitmap graphics. At the same time, the cost for the bitmap graphics is not outrageous. You just want to be aware of how much they are going to contribute to your final swift file size.
Comments