Exploring Photoshop integration
Exploring Photoshop integration
One of the benefits of working within a suite of software such as Adobe's Creative Suite is the powerful integration between the programs within the suite itself. Dreamweaver features a very streamlined integration with Photoshop, which can make working with images in your site much easier. The most powerful integration between the two programs is Dreamweaver support of Photoshop's Smart Objects. Smart Objects allow you to insert Photoshop files directly on to your pages in Dreamweaver and makes editing and updating the images between the programs a snap.
In exploring the integration between Dreamweaver and Photoshop, we'll look first in this movie at working with Photoshop's Smart Objects and then explore editing and updating our Photoshop images a little later on. So to do that I have the spotlight.htm file open and it probably looks a little bit different than you remember it. The reason for that is I've turned our Style Rendering off. To do that, go up to the Document Toolbar right-click and turn the Style Rendering toolbar on. You can also find that in the menu under View>Toolbars>Style Rendering.
Now what you are looking for is this little icon right here, Toggle Displaying of CSS Styles. What that will do is, it will either render your styles within the Design View or it will turn off Style Rendering altogether, sort of an all or nothing. And the reason I like that option and I am glad that option is available is because it makes it even easier to select very difficult areas or very complex areas within your layout. For example, in the last movie we had a hard time putting our cursor exactly where we wanted it in relation to the Student Spotlight, and now I've made it even easier on myself. Okay so, we know where we want this image to go, because we placed it in our last movie.
What we want to do is click inside the Student Spotlight div tag here, click the div tag, <div.student> to select the whole thing. And once again use your arrow keys, I am going to hit my left arrow -- and remember in the code that's going to place my cursor just prior to that div tag, so we've positioned it right where we want it. So I am going to make sure that while I am doing this I don't hit any of the other arrow keys, I don't click anywhere on the actual document itself. Okay, so the typical workflow for creating web graphics is that you'll have an original file which is either going to be in a program like Photoshop or Fireworks and then you take that file and you export it out as an optimized PNG file, a JPEG or a GIF file, one of those three formats is typical.
And then you take that file, place it in your HTML file here in Dreamweaver and then if you ever need to change it, you'll manually go ahead and fire up Fireworks or Photoshop, navigate to the source file, open it back up again, make your changes, re-export that back out again, come back into Dreamweaver and resume working. That's not a bad workflow, but it's not as efficient as it can be. So in using Smart Objects what we'll do is we'll take a Photoshop file and we'll place the Photoshop file itself directly inside of our document. Now that's a bit of a misstatement, because what Dreamweaver is actually going to do for us is Dreamweaver is going to see you do that, it's going to recognize that it's a Photoshop document and it's going to say, oh, okay, so you want to take this source Photoshop document, create an image out of it, refine it or optimize it and export it out to the file format that you want, place in the directory that you want, and place the image on the page, and it's going to do all that for you in one step.
And then it's going to establish a link back to the original Photoshop document, so that if you ever want to make changes, it knows which source file to optimize the image again from, so it's a really neat workflow. All right, so in order to place this on the page I could drag and drop, but we know how difficult dragging and dropping an image into that tight area is going to be. So I am just going to go up to the Common Objects actually to insert an Image, I am just going to click Insert Image. Once again this is going to bring up the Select Image Source, so this is pretty much the exact same workflow we used in the last movie.
And I am going to open up from the 07_04 directory, I am going to open up the assets folder, and inside the assets folder I have two Photoshop files, I have feature1 and I have chow. And of course the student's name is Gerald Chow; chow is the one we want. So chow is a Photoshop document. When I click OK, what happens is, Dreamweaver says, okay, this is a Photoshop document, I know you want to place an image on the page, what type of image do you want me to export out of this Photoshop file? So notice we get this Image Optimization dialog box and we can choose from some Presets.
We have Presets for PNG files, JPEGs and GIFs. What I am going to do this time is I am going to say JPEG High for Maximum Compatibility, that's the initial start point here. Now if you choose to not to use one of the Presets, you can come right in here to Format, choose which file format you want and then based upon the file format that you've chosen, you'll make some adjustments to the Image Quality. Now if I move this slider to the left you can see the image Quality change over here on the left-hand side, and that's what I really like about this technique is that as you choose settings, you're going to get a live preview of what that quality setting is going to do to the image.
You're also going to get a File Size down here, in this case, I can see it's 3K, I am just going to move this back up to around 60. I can see I do get a loss in Image Quality, so I am going to want to keep that up around 80, because it was a pretty significant saving I think with the file size, but the image quality was definitely noticeable. So if you've ever watched the workflow from earlier versions of Dreamweaver, earlier than CS6, you've saw an entirely different dialog box. What you would see is you'd basically see Photoshop's Save for Web dialog box, which had a lot more options to it. So you are losing some of those options that you have in Photoshop when you export the image out, and that's something you need to think about before adopting this particular workflow.
But what this workflow is designed to do is to be fast, it's designed to be extremely efficient. So if you don't have a lot of factors into saving the image, if you don't need the preview it against the original and really do a lot of close color comparison, then this is a really, really nice smooth workflow to use. Now as soon as I click OK, it's going prompt me, because we are creating a JPEG when we do this, we are exporting this image out of Photoshop. I am going to go into the images directory and I just want to save it as chow.jpg. When I save this, it's then going to prompt me for some Alt text, so I am just going to say Gerald Chow, click OK and it places the image on the page.
So if I select this, if I look at my image preferences, I can see that this is a brand-new image that we've created, it's in the images directory, its name is chow.jpg and down here in the Original, I see that it's pointing to the assets directory, chow.psd. So there is now a physical link between the source Photoshop file and this image, and in an upcoming movie we'll talk about how we can take advantage of that link by creating a really, really smooth editing workflow or optimization workflow to this image.
The next thing you are going to notice is in the upper left-hand corner we have this little Photoshop Smart Object icon. That does two things, number one, it let's you know that this is a Photoshop Smart Object, so it has a link to an original Photoshop file. The second thing that it's going to tell you is whether you are using the most recent version of that Photoshop file. So if I were to go out into Photoshop, open up that image and do something different to it, the next time I came back into Dreamweaver and opened this file up, I wouldn't see a green arrow on the bottom, I'd see a red arrow down here and that would let me know that although the image itself is okay and it's going to be fine, there's been a change made to the original, do I want to update it? So you know it's kind of the choice that I have.
Now that creates an extremely efficient workflow and it's one that we are going to take a look at and tackle in our next movie.
Creating a First Web Site with Dreamweaver CS61,070,664 Views
Dreamweaver CS5 Essential Training3,633,521 Views
Flash Professional CS6 Essential Training1,403,758 Views
Dreamweaver CC and WordPress 3.8: Core Concepts154,169 Views
Fireworks CS6 Essential Training420,937 Views
PHP with MySQL Essential Training4,274,773 Views
HTML Essential Training3,817,393 Views
Illustrator CC 2013 One-on-One: Fundamentals1,677,913 Views