Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In the last chapter, we saw how we could take a multipage Fireworks document and export it out as an interactive HTML prototype. Now, I wasn't too concerned about Optimization settings for the graphics in that particular lesson because my main concern was making sure I had something that the client could interact with. Now, we've gone past the point where the client has reviewed the site. They are happy with the way it looks. Now, it's time to get down to business in terms of turning this prototype into usable assets for our Web site. Now, I mentioned in the previous chapters, as well, that the HTML images prototype is not something you'd want to use for production level code.
It does produce a very rigid HTML table- based layout, which is not anywhere near was considered to be best practices anymore for Web design. But we're still going to have to export out images, whether we build the site in Dreamweaver or whether we make use of Fireworks CSS and Images Export function. So let's take a look, in this lesson, about the considerations you might have when you are exporting out graphics for your Web site. Now, we are not going to go and export out all the graphics and all five or six pages here. We are just going to deal with one specific page. Hopefully, you can get from that what you need to sort of extrapolate out for a full Web site.
Now, our homepage here is the one we are going to work with. It's got a couple of challenges to it, including a background image behind a semi-translucent little text box. So let's talk about, first of all, the easy bits to get those dealt with. Now, when you have a navigation bar made up mostly of text, chances are really good that you are not going to export out those individual text elements as graphics - rather, in Dreamweaver or another Web Editor, you'd create an unordered list, and you'd style that list accordingly, using CSS. The one element in here, though, that we would probably want to slice up is that little divider we see down below each of the main navigation elements.
So I am going to zoom in a bit. So and what I am going to do is take that existing slice for TOURS. I am going to remove the hyperlink. I am just going to resize my slice, just so I have that little divider, because that won't be as easy to reproduce in CSS. So there we go, and I'll just make a little adjustment. So that we see it's surrounding the entire graphic, and we could probably also make it a lot shorter too.
If we are dealing with you know, we've got bandwidth concern. We might as well just minimize this down to the bare minimum. So I can grab my corners and just redraw that slice. It can still be saved as a GIF image. But I do want to change the name. I am going to change it to link_divider. That's going to make a heck of lot more sense for me if I am calling this up in CSS, later on.
That's the only part of the navigation I really need to export, the rest of it is all text. So I am going to go ahead and select all my other navigational elements here, all my slices, and I am just going to get rid of them for now, just get them out of the way. There we go. So there is our slice for our divider. We look up top. We have a slice already for our logo. There is nothing wrong with that, except I will change the name and the format. So I am going to switch this from mockup_site to logo.
I am going to change the format to the very least. I am going to change it to GIF. It's a solid color image, and most likely it will do quite well as GIF probably better than it will as a JPEG file. Now, let's zoom out a little bit, and see what other work we have here. All right. A little bit lower, these elements have already been sliced up for us, these three here. But we'll just zoom in and see what we've got and make sure that they are the right format. These are all logos for a different spas or different resorts. So again, I am going to I select my Pointer tool and click on each of these.
It looks like they are all currently set to export as JPEG file. Now, if I hide my slices for a minute, you can see that these are all solid color images. You know, that Backpack California one might have a little bit of a gradient in it, but it's not very severe. So what I am going to do, rather than set these as JPEGs is, again, I am going to select them, and I am going to choose to export them out as, at the very least, GIF. We can tweak those settings a little bit later on. The background boxes behind these areas will be created with CSS.
There is no point in slicing this up, unless, of course, I happen to have rounded corners. Then I might need to create a three- slice technique, where I've sliced the top, at the bottom and somewhere in the middle to act as the elements for an entire container. But as a solid rectangle like this, it's not a big deal. We can just leave it and let CSS take care of it. Little bit lower down, I'll zoom out again. We have our footer. So that's also a big graphic. Its most like it is going to become a background graphic.
But it still needs to sliced up. So I am going to grab my Slice tool. I am going to draw a slice that handles that entire map area. I am not too worried if I am a little off the first time around. I could always change this up later on. It looks pretty good, but we'll zoom in and just double-check. I am right on the corner of the map. So I am just going to go up by a pixel or two, just to give myself a little bit of breathing room, make sure I am okay down at the bottom.
I am okay at the bottom, and it's all included. So this, again, is a solid color image. So I am going to make sure that I set this as a GIF for the time being. I also want to change the name. I am going to call it footer_bg. Let's move around the rest of the design here. We've got our placeholder image for our video. That's already set as a JPEG. But we'll name it suitably, video_placeholder, okay.
Little higher up, we've got our CYCLE California logo. That one, as well, should probably be, at the very least, a GIF file. We are going to go and change the name of this too. I am going to call it cycle_logo. This brings us to our last big image, and that is this fellow right here. All right. So one of the last graphics we are going to deal with in terms of slicing in this design is our background. I am going to zoom out a little bit by pressing Ctrl+0, so we can see the entire design.
There we go. I want to draw in a slice that basically handles the entire gradient. So I am going to grab my Slice tool. As I mentioned in the past, the nice thing about the Slice tool is that it respects the boundaries of your canvas. So you can start drawing anywhere. You won't start getting a slice added to your design until it actually hits the canvas area. So I am just going to draw from the upper-left corner down to the bottom-left corner. I don't need a very, very wide slice here. So I am just going to get a nice thin one. Then I am going and probably just resize it a little bit inside my Properties panel. So I've got 36 pixels there.
It's probably still a bit too wide. So we are going to change the Width to about 20, and I also want to name this. I am going to name this slice page_bkg, like so. So now with all these slices created, the next step would be to actually go into our Preview modes, and start individually optimizing all of these different graphics to get the best possible balance between image quality and file size. In some cases, we want to test out different formats. For example, I chose GIF format for quite a few of these images.
But there is an excellent chance that the PNG 8 format would do a much better job. So let's do a little bit of this before we wrap up this lesson. I am going to zoom in on the logo, and I am going to switch to my Preview mode. Now, because we are dealing with multiple slices inside of this document, I can use my Pointer tool to select individual sliced area. So if I click on a slice, you will notice it becomes nice and bold and full of color. Everything else is kind of screened out at the moment.
I can take a look in my Optimize panel to see what I've got to work with here. So as a GIF file, this image is 10.09 KB. So let's see. If I change this to a PNG file, if we get any significant difference, and actually we do. It's drop down to about 8.57. The other thing I can try out, I am going to go to 100% here, so I can see the quality, I am going to see if I can reduce the number of Colors and see if I can further reduce the file size and still maintain the quality. So I am going to go down to, oh, that's be risky, let's try 64 colors.
At 64 Colors, I am still getting a pretty good quality image, and I've cut the file size again by a couple of kilobytes. Let's see what happens at 32. At 32, we are starting to see some changes in some of the coloration. It's a little hard to notice, but if you pay close attention to cyclist's helmet here, I'll switch back up to 64, You'll see a slight difference in the helmet. This is where it becomes a bit subjective. You can determine just how far you want to go with the quality loss. I think I am happier with it here at 64 Colors.
It's still well under 10 KB, so that's a pretty good size. Now, I am going to move down with my Pointer tool to my little divider. I am going to select the divider. In this case here, this has actually got two elements to it. Don't forget we have an Upstate and an Overstate. So we want to make sure that we export out both of the graphics for that. But to begin with, let's see, we have set again as a GIF image, it's about 336 bytes. It's really tiny. But I want to try couple of things here. First of all, I think I'll just pop it over to PNG 8 to see what I get.
The PNG 8 format actually is a little bit larger. I just wanted to compare between the two of them. So I am going to switch back to GIF. I am going to set Transparency with this as well. Because, I got the white background behind the star, and I'd like to try to make that transparent. So I am going to change it to Index Transparency. You'll notice as soon as I do that, that I see a checkerboard behind my image. That basically means that I now have a transparent background. Now, if I zoom in a little bit and take a closer look at this.
Overall, it doesn't look too bad. It's little hard to judge when you are dealing with a small element like this. But it looks like we are getting good separation there. I also want to set my Matte color to match the background area that the image is going to be placed in, or as close to it as I can get. This is currently sitting on a white background. So the white matte is going to be suitable in that case as well. You might also notice here that even though I'm asking for 256 colors, there are actually only 32 colors available. So we don't need all 256 colors to make up this image.
As a result, we are getting a smaller file based on that too. So I think what I'll do is just push my luck a bit, and I'll go down to 16 colors. At 16 colors, I have a 275 byte image, so, under a kilobyte, it's 1/3 of a kilobyte. To me, it doesn't look too bad. At 32 and 16, I am not seeing that much of a difference. So if can save a little bit, I'll do it, so 16 colors it is. I am going to zoom back out again, and we'll take a look at couple of other elements here too.
Hold down my Spacebar, and I'll just scroll around. Now, again, down here on my monthly specials, I have got these icons for the different spas. You'll notice at least this one is circular. So it's got the beige background on my background rectangle. When I am exporting this out as a graphic, there is the possibility that that beige color is not going to match the CSS-based color we are use in the background rectangle. So what I am going to do here is I am going to, again, set this to have a transparent background. So first thing I am going to do is check to see if GIF will be up to do a better job.
PNG is 2.3 KB and GIF is 2.62. So it looks like PNG 8 is the winner here. I am going to set my Transparency again, just Index Transparency. Now, I have to watch Index Transparency automatically grabs a white background, and I've lost some of my image. So the nice thing about PNGs is I can actually choose Alpha Transparency, which basically just cuts out the background. I think we are in pretty good shape there. By adding in the Alpha Transparency option, by the way, we've actually boosted our font size up a little bit.
Ironically, by making a color transparent, we are actually adding file size to it. Now, if I take a look through my pallet again here, I am using 149 colors to create that image. So once again, I can certainly see if I can get away with less. I am going to try 128. At a 128, I didn't see any major difference in the image, and I did shave a little bit off the file size. Let's knock it down to 64 and see if that works. At 64, I've shaved it down even further.
Again, it does not appear to be any problem. So we get a nice, fairly small file there, just over 2 KB. The other images here, if I select these guys, again, I can certainly check and see. I'll just switch it over to PNG 8, getting a slightly smaller file, and for my calm logo, again, if I switch to PNG 8, it's about the same. In this case, doesn't really matter too much, which way I go. So might as well be consistent. I'll just leave it as a PNG file.
Now our JPEG file down here, this is only a placeholder image. So I am not really worried about the quality of this image. It's going to get removed, and a video is going to be in its place. anyway, so I can leave the Optimization settings they are. My logo for my cycle logo, here again, it's set to GIF. I'll switch it over to PNG. PNG is not that much better, so I'll just go back to GIF. We are basically dealing with exactly the same file size in this case.
I can also, if I want to, set an Alpha Transparency here or an Index Transparency, I'll try it. Index Transparency, and that gets rid of all the white background or the majority of it, and just keeps my logo nice and clear. Again, it hasn't actually reduced the file size. It actually increases the file size somewhat slightly. Transparency option is handy if you know you are going to have elements set are overlapping, or if you want to have the background color of the Web site or Web page bleed in through the image. All right.
So that is our optimization for this page. I am just going to zoom back out again. We've gone through majority of the images. The ones we didn't talk about in detail was the footer image, which really, as a solid color image, it needs to be PNG or GIF, and our background slice with the gradient, that's going to be most suitable as a JPEG file. The last images we have to work with are these three up here. Now, I am going to zoom back in, and we'll take a look here. We have our little tag, we've got our photo, and we've got this semi-transparent text box.
Now, the best way to deal with these three images is not on this page, to be honest. We need to bring these into separate files and do the optimization separately. So we'll take a look at that in the next lesson.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.