How do you make an Image from a Graphics?

1) Is it possible to make an Image from a graphics?
I've returned the Graphics of an image in the method of one class so that I can work with it in another class. I was looking for a setGraphics in the Image class but there isn't one. Nor is there a graphics.createImage(). What I'd really like to do is get the background image, draw on it in a separate class, then return it to the original class (for buffering purposes).
2) is there any way to make a blank Image of given dimensions (without actually making a .gif of a blank screen)? I want to draw on the background even if it is blank, but I can't get the Graphics of a null Image.
thanks in advance.. :-) jen

thanks for all your help guys!
i looked at those websites.
The reason why the site's buffered images work is becuase they are using the paint method in a single class. (i.e. they are not calling the graphics from someplace else). If you call a Graphics (using getGraphics and the like) from someplace else, you don't get a reference or pointer; you get a COPY. The copy will helpfully record your instructions. But the original graphics doesn't get the instructions. That's my problem. My graphics instructions are not getting sent to the originating Graphics, so drawRect never gets executed.
Another problem is that I often have no background picture in my container, and hence, I have a null pointer when I try to draw stuff on the returned Graphics.
So what I want to do is create an image in the subclass of the rectangles, lines, whatever, and send it to my handy little setBackground(Image im) method in my superclass. And whenever the background image is null, create a white image to draw on.
I am calling the graphics from the background of a custom lightweight container. I would REALLY REALLY not like to mess with my container code... it took me a long time to get it working.
I also don't want to override paint. That would make all the buffering work I did obsolete. :-(

Similar Messages

  • Sorry I'm new to Final Cut Express. How do you make an image (jpeg file for example) move across the screen slowly as I've seen in many films.

    Sorry I'm new to Final Cut Express. How do you make an image (jpeg file for example) move across the screen slowly as I've seen in many films.

    Neil from bristol wrote:
    … How do you make an image … move across the screen …
    by setting KEYFRAMES
    (read, what FC/e's built-in Help-feature tells about it)
    resize and set pic to start position
    set keyframe
    move playhead in timeline to desired length
    set pic to end position
    set keyframe …

  • How do you remove duplicate images from your all images file on your mac desktop

    How do you remove duplicate images from your all images file on your mac desktop?

    Don't under any circumstances.
    All images is not a file. It's not a place. It's a list. Specifically, it's the result of an instruction: List all the images on my machine.
    When you delete something from All Images, then you have no idea what you're removing from where - files that are part of word processing docs, interface elements, corrupting your iPhoto Library. There are many perfectly legitimate reasons why you might have what appears to be duplicates but are not.
    Rule number One: Never delete anything on your machine whose job you don't understand.

  • How do you make an image or text, appear on every slide?

    How do you make an image appear on every slide?

    What part did you not understand?
    As Andrew said, open the Keynote file, go to the View Menu>Show Master Slides
    This is what you should see on the left hand slide of the window. The Master slides are at the top and the check mark goes by the Master Slide that is referenced on which ever slide you have selected in the Slides pane.
    Add to the Master slide the image or text that you would like to see on the slides that are made off of that master. You can see in the Title & Bullets master slide, I added the shape in the lower left hand corner and it was added to all the slides build off that master.
    If this still isn't clear, let us know where you are getting stuck and we will try to help.

  • How do you make a jpeg from a clip

    How do you extract (or make) a jpeg from an iMovie clip. That is,the fairly new edition of iMovie?

    You could just make a screen grab of the video playing, that is the easiest.
    Open photos app, and play the video, pause where you want the image from.
    Then hold the power and home button to grab a still image of the screen.
    There is an app called videopix that can also grab full frame video grabs.

  • How can you make an image change every time you refresh a page?

    Hi.
    I've recently redone my website and was wondering how I could make the image on my main page change every time you refresh the page?
    Like is there a certain script you can use?
    Here's my website
    www.liamfawcett.com
    Thanks

    Copy & Paste the following JavaScript code between the <head> and </head> tags in your HTML document, in Code View of course.
    <script type="text/javascript">
    <!--//Random Banner image on Page Reload
    //store the images in arrays below
    images = new Array(5);
    images[0] = "<a href='http://www.example.com'><img src='some_image.gif' </a>";
    images[1] = "<a href='http://www.example.com'><img src='some_image.gif' </a>";
    images[2] = "<a href='http://www.example.com'><img src='some_image.gif' </a>";
    images[3] = "<a href='http://www.example.com'><img src='some_image.gif' </a>";
    images[4] = "<a href='http://www.example.com'><img src='some_image.gif' </a>";
    index = Math.floor(Math.random() * images.length);
    document.write(images[index]);
    //done
    // -->
    </script>
    In the array, change URLs (http://www.example.com) to your own links.  Change images (some_image.gif) to your own images.
    Save page.  Preview in browser.  Hit refresh (F5 or Ctrl+R) to see the images change.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • How do you make new pages from a page so they have the first page in their address.

    I am talking about something like the adobe site.
    Like www.adobe.com/support/dreamweaver/whatever
    How do you make a page be under another like the dreamweaver page is a link from the support page.
    My goal is something like this.
    I have www.architecture.com/profile
    I need
    www.architecture.com/profile/Commercial
    www.architecture.com/profile/Residential

    If im understanding you correctly, you want the folder to have an automatic landing page. Ex. If your folder is
    "profile" you want the visitor to see the first profile page when they visit www.yoursite.com/profile. Correct?
    If thats what you need, name the page you want your visitor to see when they go to ex. www.yoursite.com/profile "index.html" or "index.php" ad save that file in your "profile" folder. When you're visitor will go to www.yoursite.com/profile the page you named "index" will open.
    Let me know if you dont understand or if its not what your trying to do.

  • How do you save an image from messaging

    How do you save an image sent with messaging In ios7 on my iphone?  I can't find the option and it does not automatically do this.

    Press on the image to bring it up full-screen and then press the export button in the bottom left and then choose where to send it or save it.

  • How Do You Make an Image Flow with the Text?

    Hello all,
    I am using CS4 InDesign on Windows Vista. I am fairly new to Indesign but try to do my research and homework well before asking what I hope is not a really dumb question.
    I am writing a book of approx. 350 pages that is an illustrated encyclopedia of 156 plants and their oils.
    Each 2 page spread is a single entry for a plant. The graphics frames on each spread are identical in size, position and styles for a consistent look throughout the document.As you can see (hopefully) each page is a single column. See screenshot below
    In order to overcome my first problem of positioning and sizing the graphics frames uniformly, I created the master pages with the graphics placeholders sized, positioned and formatted to my liking. This worked wonderfully and I placed all of my 300+ graphics by simply over riding each frame.
    Then in my editing I decided to add another 2 page spread somewhere in the middle of this fairly large document.
    What a NIGHTMARE. The text predictably shifted but now ALL of my graphics were no longer associated with the corresponding text! Arrrgghhh.I had not anticipated this behavior (used MS Word for 15 years) or I would have done something different.
    3 hours later I finished re -"placing" the images associated with the correct text.
    I researched the help file and found out about the neccessity of anchoring graphics to text. I have read through the threads in this forum, followed links to "indesignsecrets.com/make-an-image-flow-with-the-text" and " Working with anchored objects by Anne Marie Concepcion"
    My concerns are this.
    An inline graphic places the graphic back onto your text layer for some reason ( Previously my graphics each had their own layer)
    Not wanting to start (again) from scratch with my graphics I converted them to inline/custom anchored objects.
    But to select then cut then paste every pre existing graphic to anchor it inline seems to be cumbersome and counter intuitive although the top smaller graphic did position well and the text seemed to wrap ok.
    When I placed the larger bottom graphic on the left facing page using custom positioning I was not able to get the text to wrap at all.( The in line anchoring did not seem to allow for positioning on anything but the 'Y' axis).
    It seems that there would be a simpler way to place text and graphics where you want them and have them associate and flow together (or not) when you want them to and have text wrap easily around an anchored object without keyboard gymnastics. It would seem that the concept of a certain graphic being associated or linked with certain text would not be an unusual concept in desktop publishing.
    Am I missing something?
    Can you place an anchored graphics frame on the master page with your desired options?
    How would this be done if possible?
    Is there any other way (i.e grouping) to keep graphics associated with the desired text so that it flows together if extra pages are added?
    Is the fact that my graphics frames are on my master pages responsible for my text wrap difficulty? (I have text wrap enabled on my master pages)
    Are there any settings, redundant or otherwise, I need to be aware of?
    Thank you in advance for any suggestions or directions
    L.N.

    Hello Again,
    Thank You Bob but I am still a little fuzzy on this. I have already created object styles for the graphics frames. For instance the small graphic underneath the heading (Its a drop of oil) has an object style applied. Now I checked and it has the anchored object options checked in the style dialog box. When I reapply the style to the next similar graphics nothing happens. It is still not anchored. Do I need to create a new style based on "nothing" add my effects plus the anchoring options? Basically start over. If thats what I need to do thats OK. As to your instruction that object styles could accomodate this anchoring thing...thats what I thought too but somehow I can't get it to work. See object style dialog box screenshot below:
    For the larger graphic on the bottom of the left facing page. I still cannot get any text to wrap. In the screenshot example the text describing this particular plant doesn't go to the bottom of the page so the wrapping issue on this page is moot. However I have some entries where the body of the description is more involved and does go to the bottom of the page and the text WOULD need to wrap around the plant (larger ) graphic.
    Hi there Harb, Yes I found out early on that object styles can't apply size (that would be on my wish list for sure) That is why I found that creating my graphics frames on the master page with the correct size, effects and positioning tickled me so much. Can you believe I originally went through and MANUALLY resized and repositioned each and every 300+ graphics in this book but it still wasn't right. I'm nothing if not persistent. (Now if I could just get my grown sons to pick up their socks!)
    Anyway the master page graphics frames idea would be perfect if I could get the images to anchor in their respective spots on the master page as well.
    For your second suggestion. I am not clear about why I would need to break the threads of each spread so that each spread is a seperate article. Is the threading issue the thing that is causing my text to move on leaving their associated graphics behind? If so how do I go about doing this?
    So to recap:
    1. I need to know if I can modify my object style or recreate from scratch with the anchoring option (as I said it didn't work)
    2. Can't get text to wrap around the Custom anchored graphic at bottom of page at all
    3. Im not clear on the breaking the threading on the spreads
    I am willing to go back through and start from scratch (new master pages, styles etc ) if neccesary. This book is the culmination of 7 years of research and artwork.Basically the project is DONE. Now if I can just format it correctly.
    I can't thank you both enough for your time, suggestions, expertise and patience.
    Thanks again
    LN

  • How do you Automatically Copy Images From Camera?

    I would like to create an AppleScript that will run when I plug in my digital camera. Here is what I cannot figure out.
    How to make it run when the camera is plugged in.
    How tow to copy images from camera to a designated folder.
    Thanks!

    You can do all you requested - without 'AppleScript'.
    01. Connect your camera launch 'Image Capture' ('/Applications/' folder - if it does not automatically launch.
    02. Select the 'Image Capture, Preferences...' menu item.
    03. Click on the 'General' tab.
    04. From the 'Camera:' 'When a camera is connected, open:' pop up menu - select the 'Image Capture.app' menu item.
    05. From the 'Devices' menu select your camera from the menu items list. A window will appear with the title of your camera.
    06. From the 'Download To:' pop up menu select where to save the camera's photographs. You can select any folder anywhere on your hard disk drive(s).
    07. Click the 'Options...' button, and from the drop down sheet click on the 'Connection Options' 'Automatically download all items' check box - to add a check mark. There are other options you may have be interested in.
    08. Click on the 'OK' button.
    09. If you want to download the photographs now - click on the window's 'Download All' button. Or, to test the above setting changes - quit 'Image Capture' and disconnect your camera. Then reconnect the camera - and watch the above setting changes take effect.
    Note:
    The above automatic action can also happen if the storage device of the camera were inserted into a USB digital camera card reader. So long as apply the Steps above, and you select the USB digital camera card reader from the 'Devices' menu's menu item list in Step 05 above.
    'Image Capture' is not scriptable; but, may be control-able via 'tell application "System Events" to tell process "Image Capture" ....
    When a camera is connect to the Mac, the storage card of the camera is mounted onto the 'Desktop' and also listed, as an alias, in the (invisible) '/Volumes/' folder.
    Now that you know the name of the storage card ... you can create a 'Folder Action Script' (an example is presented below) and save it into the '/Library/Script/Folder Action Scripts/' folder,
    Open the '/Volumes./' folder (in 'Finder' via 'Go, Go to Folder' - enter '/Volumes/').
    Perform a right button click ('<control> - click, for single button users) on the 'Volumes' folder's window, and select 'Enable Folder Actions' (if not already).
    Rpeat the right button click (<control> click) and select 'Attach a Folder Action...' - selecting your script ('Volumes_FAS.scpt' as shown below).
    Below is a 'Folder Action Script' example - where you will have to substitute 'NO NAME' with the name of your digital camera's storage card's name.
    -- --- Save code as a script with the name 'Volumes_FAS.scpt' --- --
    on adding folder items to this_folder after receiving added_items
    set myStorageCard to "NO NAME" -- The name of my 1 GB stroage card. The name of your card may differ.
    repeat with i in added_items
    tell application "Finder" to set tName to (name of i) as string -- Obtain name of mounted storage card.
    if (tName is equal to myStorageCard) then my handle_card(i) -- If my storage card, continue processing.
    end repeat
    end adding folder items to
    on handlecard(localVolume)
    set folder_Path to ((path to desktop folder from user domain) as string) -- Path to 'Desktop' folder.
    set download_Folder to "NO_NAME Photographs" -- Name of folder to store storage card's items (files and folders).
    -- create download_Folder, if it does not exists.
    tell application "Finder" to if (not (exists folder (folder_Path & download_Folder))) then make new folder at (folder_Path as alias) with properties {name:download_Folder}
    -- Duplicate all the items (files and folders) of the storage device to the '~/Desktop/NO_NAME Photographs' folder.
    tell application "Finder" to duplicate items of local_Volume to (folder_Path & download_Folder) as alias
    end handle_card
    -- --- End of code --- --
    Review 'Finder's dictionary (in 'Script Editor') for the various ways to incorporate 'duplicate ...'.
      Mac OS X (10.4.4)  

  • How do you make an image have a transparent background?

    i brought an image from PS into Illustrator and i want to put it in AE and use the puppet tool. however, when i bring it in it has a white background, but i just what the object i am going to puppet, so how do i do that?

    AE does not require an image to be sent through Illy first. Just make sure your image has a transparent background and/or an alpha channel if need, then save as a psd file. In AE bring the psd file in as footage, unless you need a compostion and folder for the psd created in the project list. You should then be able to use the puppet tool on an image with a transparent background.

  • How can you make an image adjustment on all images in a Stack

    If one had a stack of images that need a brightness adjustment. How can you preform the adjustment a stack of images that need the same amount of adjustment?
    Many times I have a stack of images that need a +10 brightness adjustment on them and it would save a lot of time if I could do it on a whole stack of images.

    good points, as l/s takes every adjustment ... including autolevels/exposure ... BUT DOESN'T make them auto to the next image(s), it just lifts the current image settings !!! which is fine for a five shoot series all at the same exposure, but not so much when it is not !!!

  • How do you load an image from an external homepage?

    Hi,
    I am searching for a method to load images from an external homepage. I do not want to use an application to do this. How can I achieve this. I know how to load texts from external pages but i can not immagine to download an immage via readLine. It would be nice if you could paste some code.
    I hope you can help me.

    Look at the URL object in the API, you use that and the associated InputStream.

  • How can you print mirror image from word 2010 on the HP Photosmart c310 printer

    Trying to print mirror image from Microsoft 2010 on a windows 7 computer to the HP Photosmart C310 printer. Can not find an option. Please advise.

    Judith
    Perhaps you can enlighten us as to what "does not print correctly" actually means.
    Miss-spells your name? or what?
    How have you set up your Page set-up?
    It has to agree with how you are feeding the envelope in and what printer driver you are using.
    Peter

  • How do you make an image enlarge on hover, like on the new google image search?

    Here's an example:
    http://www.google.com/images?hl=en&source=imghp&biw=1109&bih=690&q=cat&gbv=2&aq=f&aqi=g10& aql=&oq=&gs_rfai=
    When you roll over the image it enlarges.  I like it because you don't have to click anything, and you hover over a bunch of images without refreshing the page or having an obnoxious popup you have to close.
    Is there a ways to create this in dreamweaver?  Do you have to make 2 different image sizes (like in the dijointed rollovers)?
    Thanks!  I love this forum!
    Kate

    You have to insert a rollover object.  Not sure what version you are working in.  But you should have the option to select "insert", "Rollover Object" then you followi the guide.  You will need to create 2 copies of your image - one that is smaller that will be your thumbnail and then the larger image.  The first thing you will be asked for is an image ID - give it whatever name you want, but I recommend lowercase letters only.  The 2nd thing will be to insert your thumbnail as a jpg and the you insert the larger image, again as a thumbnail.  Don't forget to gill in the alternate id name as well - can be the same as your original id name.
    THIS IS IMPORTANT
    After you insert the image you must switch to code view and delete the size parameters that appear after the image.
    I hope this makes sense...but if you need further help....just ask.

Maybe you are looking for

  • Lost January Update and I am Pi$$ed

    After reading the horror stories about the version 2 update, I elected not to update. I received the prompt then to update to 1.15 which I did. Shortly after I did, all of my files on the Ipod were transferred due to some kind of a glitch to "other",

  • Why can't I download TV episodes in Germany?

    Hi I would really like to know why Apple won't/can't offer downloads for Videos in Germany. It's very very frustrating to find your favorite show, only to see a certain iTunes Message which goes like 'The content you are requesting is not available i

  • I have lost app icon on my ipad, can you tell me how to get it back ? Thanks

    Help! i have lost app icon on my ipad and cannot get into store.  How do i get it back?

  • Internet videos with little white box in middle

    When viewing videos on the Internet I keep getting a little white box with Adobe Flash Player on top and an unknown company asking permission to download on my computer with an option to Accept or Deny on the bottom.  When hitting the Deny button it

  • C7-00 EMail Access

    Hi, I have been using C7 since Oct. I had my Gmail n Yahoo Account configured, up n running. Recently I figured out that the the mail service isn't working. I tried almost every thing to resolve...but of no use. Any pointers in this regard are welcom