How do i create an Image in my own class

Hi!
I have a class
public class gBuffer {
which is used for double and tripple and n-th
buffer of graphics.
I need to create an image in the constructor, but
the only way i could do it is something like:
Applet a = new Applet();
Image i=a.createImage(100,100);
I just could not find any other class where createImage()
is not abstract.
How do i do it right?

You need a real live Component object that will enable
you to do something like this:
Component c = get_a_Component_from_somewhere();
Image writable = c.createImage(100,100);
Graphics g = writable.getGraphics();
g.drawxyz(...);
g.dispose();If you're programming from within an application or servlet,
with no real GUI components available,
then you might have a problem. You might create a
Frame object without ever making it visible.
-Ken

Similar Messages

  • How do i create an image in PSE11 to look like a negative strip?

    How do i create an image in PSE11 to look like a negative strip? I have been able to do this in the past in older PSE but i cannot find the option in this version.

    This is not the "PSE" forum.
    You want the Ps Elements forum across the hall:
    http://forums.adobe.com/community/photoshop_elements

  • How do I create an image like this?

    Completely new to PS. How would I create an image like this with text? https://www.facebook.com/photo.php?fbid=10151570901245020&set=pb.50687255019.-2207520000.1 366989903.&type=3&theater
    A link to a tutorial would be helpful.
    Thanks!

    Hi there,
    Are you referring to the text, the color effect, or both?
    Adding type is very easy - just grab the Type Tool from the tool bar. The article linked above provides some great tips for editing type in Photoshop.
    As is the case with many "how to's" for Photoshop, there are several ways to acheive the colorized effect like the one applied to image you linked to. One method is to use Adjustment Layers, which I have outlined below.
    1. With your image layer active (it will be highlighted in blue in your Layers panel, as shown below), create a selection of the area you'd like to colorize. I'm using the Polygonal Lasso Tool to create a diagonal selection - to do so, I held down the Shift key on my keyboard as a created my diagonal lines. This might take a bit of practice, but you'll get the hang of it quickly.
    2. Then, in your Adjustments panel (if you don't see it, go to Window > Adjustments), click on the Curves adjustment layer, as highlighted below. Now you can play around with the curves to get the effect you'd like. (Here's a quick guide on using the Curve tool)
    3. To select the other areas of your image, command (Mac) / control (PC) click on the adjustment layer thumbnail (highlighted below). Then, go to Select > Inverse.
    4. Now we want to deselect part of our selection. Grab the Quick Selection Tool from the toolbar and set it to Subract from selection. Then, simply drag the selection brush over the area you want to deselect. In my case, I only want to have the upper-left corner of my image selected.
    5. After you have your selection, click on the image layer and add a Curves adjustment layer like before.
    6. Repeat steps 3-5 for the other corner of your image and you should end up with something like this:
    The nice thing about using adjustment layers is that you can always change them - just double click on the Adjustment layer thumbnail (highlighted in step 3).
    Alternatively, you can select areas of your image and fill the selections with flat colors on separate layers. You can then go in a change the Blend Mode and Opacity for each layer.
    Feel free to reply with any questions!
    Kendall

  • How do i create an image to look like a negative strip?

    How do i create an image in PSE11 to look like a negative strip? I have been able to do this in the past in older PSE but i cannot find the option in this version.

    Maybe you had installed an action into your previous version of photoshop elements?
    Anyway here's an action that will work in pse 11, although the look is a little different.
    http://photoshop-action.no/specialfx.htm
    Also, some from panos fx
    http://www.panosfx.com/commercial-free-photoshop-actions/film-machine

  • How do i create a single instance of a class inside a servlet ?

    how do i create a single instance of a class inside a servlet ?
    public void doGet(HttpServletRequest request,HttpServletResponseresponse) throws ServletException, IOException {
    // call a class here. this class should create only single instance, //though we know servlet are multithreaded. if, at any time 10 user comes //and access this servlet still there would one and only one instance of //that class.
    How do i make my class ? class is supposed to write some info to text file.

    i have a class MyClass. this class creates a thread.
    i just want to run MyClass only once in my servlet. i am afriad, if there are 10 users access this servlet ,then 10 Myclass instance wouldbe created. i just want to avoid this. i want to make only one instance of this class.
    How do i do ?
    they have this code in the link you provided.
    public class SingletonObject
      private SingletonObject()
        // no code req'd
      public static SingletonObject getSingletonObject()
        if (ref == null)
            // it's ok, we can call this constructor
            ref = new SingletonObject();          
        return ref;
      public Object clone()
         throws CloneNotSupportedException
        throw new CloneNotSupportedException();
        // that'll teach 'em
      private static SingletonObject ref;
    }i see, they are using clone !, i dont need this. do i ? shouldi delete that method ?
    where do i put my thread's run method in this snippet ?

  • Certain Numbers templets allow you to drag and drop contacts to populate cell data, how can I create that functionality in my own tables?

    Certain Numbers templets allow you to drag and drop contacts to populate cell data, how can I create that functionality in my own tables?

    If you haven't come across the workarounds thread you may find helpful tips there on this and other ways to work with Numbers 3.
    ronniefromcalifornia discovered how to bring contacts into Numbers 3. As described in this post:
    "Open Contacts
    Select all the cards you want
    Copy
    In Numbers, in a table, select cell A1
    Paste
    Boom. Works great. Even brought in the pictures. Cool."
    So instead of drag and drop, just select in Contacts, copy, and paste into Numbers
    SG

  • How to create an object of our own class by using Class.forName()??

    how to create an object of our own class by using Class.forName()??
    plzz anser my qustion soon..

    Class.forName does not create an object. It returns a reference to the Class object that describes the metadata for the class in question--what methods and fields it has, etc.
    To create an object--regardless of whether it's your class or some other class--you could call newInstance on the Class object returned from Class.forName, BUT only if that class has a no-arg constructor that you want to call.
    Class<MyClass> clazz = Class.forName("com.mycompany.MyClass");
    MyClass mine = clazz.newInstance();If you want to use a constructor that takes parameters, you'll have to use java.lang.reflect.Constructor.
    Google for java reflection tutorial for more details.
    BUT reflection is often abused, and often employe when not needed. Why is it that you think you need this?

  • How do I Create interactive images to be used in another website?

    Our office is contracted with a simple website company, so from the begining the framework is there. I want to add an interactive map that has each county hyperlinked to information about that area. I was told that Dreamweaver is the program I would need in order to create it.
    So, I have the program now but every tutorial I read is about making your own website in dreamweaver and I can't find anything about how to create the image to upload into a different website.
    Anyone know how to do this????
    Thank you!

    This helps, thanks. I have the content on the web page (where the hyperlinks will attach to), I have the image of the map, and I am making the shapes for the hotspots, just not how to get it all to link up.
    Also, when I saved a trial (just to make sure it would all work) it doesn't successfully upload as an image onto the website, just a little box with a red X. Any more thoughts anyone? 

  • How can I create an image gallery with "next" buttons?

    So I am almost done with my portfolio site (YES!)..now I just need the actual content (the images). My site is written in AS3.
    I've watched many tutorials on how to create an image gallery (auto scrolling ones, scrolling ones that require mouse hover, etc etc), but those aren't what I am looking for.
    I want a gallery that looks exactly like this one here:
    http://jalbum.net/res/help/integrating-tutorial.html
    I have a lot of work to display in my porfolio so there must be arrows at the end of the thumbnails so I can add more stuff. So I am just stumped on how to make the image gallery work with the ability to scroll for more photos with the click of the arrows.
    Any ideas? Thank you.

    Watching tutorials and learning from them are two different things.  If you have learned from them you should be able to use what you have learned to devise a gallery such as the one you link to.  If you have learned from them and cannot use what you learned, then you probably need to find/learn more.
    If you study the design you linked you should be able to reason out what elements you need to devise... it is not overly complicated. 
    For the large picture you could have a Loader into which you load whatever image is selected from the thumnails. To get a brief transition you could just set the alpha of the Loader to 0 when an image change is occuring and gradually fade it in after the image has loaded.
    The greatest challenge you are likely to face is in getting the thumbnails to advance back and forth depending on which is selected.  All of the thumbs would be placed in a container (movieclip or sprite) and that would be masked so that only a portion of them is visible. 
    All thumbs that are not selected have their alpha property set to some value less than 1.  Selecting one calls for the file it associates with to be loaded into the Loader.  If the choice happens to lie off screen, then you need to move the movieclip that contains all of the thumbs some set value in the right (+x) or left (-x) direction.
    If you want the thumbnails to wrap infinitely then when one leave the thumbnails area for movement in a direction, you need to take that thumb and relocate it to the other end of the thumbs in the container.

  • How can I create system image of Win-7 only on drive with Win-7 (NTFS) and Win-ME (FAT-32) system partitions

    I am trying to create a Windows 7 Image Backup on my Windows 7 Ultimate 32 bit PC.
    I have two bootable partitions on my hard drive. One is NTFS and contains the Win-7 system files.
    The other is FAT-32 and contains a Windows-ME system.
    When it comes to selecting the drives (partitions) for backing up, both are marked as System, and both are selected. Both are also "greyed out) - I cannot uncheck them.
    Furthermore, the Windows-7 imaging utility supplied with Windows-7 returns an error saying it cannot image the disk because it contains a partition that is not NTFS.
    How can I select and image ONLY the NTFS partition that contains the Win-7 system? That is what I want to do.

    Any of the products listed below will backup the contents (all partitions) of your disk drive. The only limitation is that you must install the backup software in Windows 7. You will perform a "Disk and Partition" backup by manually selecting
    the disk and all partitions (NTFS / FAT32) and the Master boot Record (MBR) on the drive. The destination / where the Image Backup will be stored should be an external USB drive. With a "Disk and Partition" backup you can restore any partition
    to your existing drive or the entire backup (to the same disk drive or a new drive).
    EaseUS Todo Backup Home V7.5
    http://www.todo-backup.com/home/home-backup.htm
    Free version:
    http://www.todo-backup.com/products/home/free-backup-software.htm
    Version comparison chart:
    http://www.todo-backup.com/products/home/comparison.htm
    Includes: Incremental backup, Disk/partition clone
    User's Guide: http://www.todo-backup.com/download/docs/User_Guide.pdf
    (Note: Install Todo and then create an "Emergency Disk" before you start creating your first image backup)
    Version 7.0 supports XP, Vista, Windows 7, 8 and 8.1
    Acronis True Image 2015:
    Has a 30 day trial version available, trial Key sent to your Email Address.
    Note: Cloning and drive initialization (creating a MBR) are not supported in the trial version.
    For the trial version, recovery is available only when booting from an Acronis Bootable Media CD.
    Install Acronis and then create a bootable Restore/Rescue Media CD before you start creating your first image backup
    http://www.acronis.com/en-us/personal/true-image-comparison/
    30 day trial : http://www.acronis.com/en-us/personal/pc-backup/
    True Image User Guides and documentation:
    http://www.acronis.com/en-us/support/documentation/
    2014 supports XP, Vista, Windows 7, Windows 8 and 8.1
    Paragon:
    Free version: http://www.paragon-software.com/home/br-free/
    User'sGuide:
    http://www.paragon-software.com/home/br-free/download.html
    Home Version $39.95: http://www.paragon-software.com/home/brh/
    Support: http://www.paragon-software.com/support/
    Macrium Reflect Free:
    Free version: http://www.macrium.com/reflectfree.aspx
    (no technical support available for the free version)
    Macrum Reflect Standard ($49.99)
    http://www.macrium.com/personal.aspx
    Suport: http://www.macrium.com/ticket.aspx
    Note: For users who have a Western Digital disk drive there is a free version of Acronis 2013:
    http://support.wdc.com/product/downloaddetail.asp?swid=119
    Release notes:
    http://support.wdc.com/download/notes/ATI_WD_RN_5962.pdf
    Users Guide for WD Version:
    http://support.wdc.com/product/downloaddetail.asp?swid=119&type=userguide&wdc_lang=en
    J W Stuart: http://www.pagestart.com
    Never be afraid to ask. This forum has some of the best people in the world available to help.

  • How do I create an image of my hard drive on a back up drive

    I just reinstalled Tiger and I would like to create an image of my hard drive on my back up hard drive. How would I do this.

    Hi geronimomac
    This can be done
    a) via Disk Utility. Start it, highlight the disk you want imaged (that is click on its icon on the left of the Disk Utility window) and then form File > New select "Disk Image from disk..." Save it on your desired location and watch the blue bar progressing.
    b) third party (back-up) utilities such Retrospect, Carbon Copy Cloner or SuperDuper! They are all commercial utilities each capable of the task.

  • How do I create an Image of my Solaris 10 (Intel) server?

    I'm currently running Solaris 10 (Intel) on a Dell PowerEdge 2650. I'd like to create an Image of the server now that I have all the extra software installed and configured correctly.
    I used Symantec Ghost for my Window based servers, does anyone have any suggestions for the best method/software to do the same for my Solaris servers? Any help would be appreciated.
    Thanks

    Using dd is about the most hideous thing to do since restoring the data will cause you much grief. The best approach would be to use the 'ufsdump' command. You can easily dump your slices into files, and perform either full or interactive restores.
    Better yet; whenever you get a bigger disk you won't be wasting space (or risk corrupting data) through the use of dd. Next to data the dd command would also restore the partition table, boot sector, etc. And thats not very good if the disks differ too much.

  • How to save a drawn image in our own format

    hai,
    i'm developing a designing tool. in that user can draw any type of diagrams. i have to save the drawn image in my own extention... how can i do it. provide me some sample code if u can...

    mituli wrote:
    Thanks,
    but I am using Image.getScaledImage() to get scaled image(obviously). This returns an Image object. When I call getGraphics() on this object it throws an exception:
    Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: getGraphics() not valid for images created with createImage(producer) at sun.awt.image.ToolkitImage.getGraphics(ToolkitImage.java:292)Try using createGraphics() instead.
    In javadoc i found out that this method can be used only on off-screen image. What is off-screen image?Use BufferedImages, you'll have a lot less problems.
    Anyway I can't use this object in ImageIO.write because it requires RenderedImage object which can only be BufferedImage object.
    I tried to cast Image to BufferedImage but can't be ... If you need to get your Image painted onto a BufferedImage, you can do it like this:
    BufferedImage bi = new BufferedImage(myImageWidth, myImageHeight, BufferedImage.TYPE_INT_RGB);
    Graphics2D  g = bi.createGraphics();
    g.drawImage(myImage, 0, 0, null);

  • How do I create an image with a transparent shape?

    Hi
    This should be easy -
    The end result I want is this:
    a png which is mostly black (or any colour) but with a defined shape in it which is transparent.
    I have the shape. I select it. I seem to be able to make a mask from this (a selection which I can copy and move about). But what I can't figure out how
    is how to create a new image which is filled except for this masked area.
    Any help gratefully received.
    Thanks
    --Justin Wyllie

    Open a blank, new file with foreground color green
    Type text
    Open effects palette, and in the drop-down go to bevels, then select "Simple Emboss" - it is the second one in my program. Apply
    Still in he effects palette, in the drop-down, go to visibility, select "Hide". Apply
    Double click the f icon on the text layer in the layers palette to bring up the Style settings dialog, and add a small stroke to better define the letters.

  • How can I create GIF images in Photoshop?

    Hi,
    I want to create GIF animated images for my website named is http://www.veominfotech.com. I have tried but there is some problem with image smoothness. Can you suggest me a solution how I can give smoothness in GIF animated file.
    OR
    Can you suggest me any other software where i can create GIF animated image.

    Add more frames.  See link below for details.
    http://www.bigstockphoto.com/blog/creating-simple-yet-effective-animated-gifs-in-photoshop
    Nancy O.

Maybe you are looking for

  • Two Message Servers in one System

    Dear all. I learned from http://help.sap.com/saphelp_nw04s/helpdata/en/84/54953fc405330ee10000000a114084/content.htm that one SAP system has one central instance which contains one message server. But our system seems to have two message servers. Our

  • Pass variable into execute sql task

    hi i want to execute my stored proc, in ssis package . i have 2 parameter, so i need pass values from another table one by one. i need to execute stored proc for each from another table, by passing values how to do it

  • How to decompose a string with ';' into Internal table

    Hello all, I need your help for find a Function module or Abap code. I have a file with the separator is the ';' Example of the contains of my file : 521010;16;46048,00;;*Soucet*Odmena za 524012;41;103807,00;;Zdrav.p.organizace 524012;42;;18332,00;Zd

  • More photos in settings than photos app shows

    After updating to IOS8 my 5c says that I have 368 photos when I look at my storage in settings but when I go to the photos app it says I only have 155 photos. I've deleted pictures to try to bring the 368 number down but I don't know what else to do.

  • Audio file not found - deleted

    (I've read some of the old threads about this, however none of them seem to have a solution as far as I can see.) So the problem is that I'm regularly receiving error messages when I open a project, which say "Audio file x not found", and this repeat