Is it possible to create an image from part of a png image???

i have an image and i want to create 4 indivdual image from it in which they could be combined to reform the image that i have

Its actually quite easy, first you create a new blank image the size of the section you need, then you draw the larger image onto the new image so that the section you want starts at the top left corner of the new image. I use the code below, which works fine.
Image image = Image.createImage("/myimage.png");
int width = [whatever the width of the new image is];
int height = [whatever the height of the new image is];
int x = [x position of where your image section starts];
int y = [y position of where your image section starts];
//Creates a new Blank Image where we will draw our
//section on to
Image imageSection = Image.createImage(width, height);
Graphics g = imageSection.getGraphics();
//set the clip
g.setClip(0,0, width, height);
//Draws our larger image onto our new image
g.drawImage(image, -x, -y, g.TOP|g.LEFT);

Similar Messages

  • HT204053 the only way to creat an icloud account is with a ipad, iphone or imac. is it possible to creat the account from my windos PC? i already downladed i cloud, and i have an Apple ID but Not an Icloud account/

    the only way to creat an icloud account is with a ipad, iphone or imac. is it possible to creat the account from my windos PC? i already downladed i cloud, and i have an Apple ID but Not an Icloud account/

    Isa Garduño wrote:
    the only way to creat an icloud account is with a ipad, iphone or imac Apple computer.
    As you already knew, no, you cannot create a new iCloud account from anything but the above devices.
    http://support.apple.com/kb/HT4436

  • Is it possible to create foreign key from composite key in other table.

    SQL> desc PRODUCT_CONFIG_OPTION;
    Name Null? Type
    CONFIG_ITEM_ID NOT NULL VARCHAR2(20) --composite primary key
    CONFIG_OPTION_ID NOT NULL VARCHAR2(20) --composite primary key
    CONFIG_OPTION_NAME VARCHAR2(100)
    DESCRIPTION VARCHAR2(255)
    SEQUENCE_NUM NUMBER(18)
    LAST_UPDATED_STAMP TIMESTAMP(6)
    LAST_UPDATED_TX_STAMP TIMESTAMP(6)
    CREATED_STAMP TIMESTAMP(6)
    CREATED_TX_STAMP TIMESTAMP(6)
    SQL> DESC PRODUCT_CONFIG_ITEM;
    Name Null? Type
    CONFIG_ITEM_ID NOT NULL VARCHAR2(20)
    CONFIG_ITEM_TYPE_ID VARCHAR2(20)
    CONFIG_ITEM_NAME VARCHAR2(100)
    DESCRIPTION VARCHAR2(255)
    LONG_DESCRIPTION CLOB
    IMAGE_URL VARCHAR2(255)
    LAST_UPDATED_STAMP TIMESTAMP(6)
    LAST_UPDATED_TX_STAMP TIMESTAMP(6)
    CREATED_STAMP TIMESTAMP(6)
    CREATED_TX_STAMP TIMESTAMP(6)
    SQL> desc product;
    Name Null? Type
    PRODUCT_ID NOT NULL VARCHAR2(20)
    PRODUCT_TYPE_ID VARCHAR2(20)
    PRIMARY_PRODUCT_CATEGORY_ID VARCHAR2(20)
    MANUFACTURER_PARTY_ID VARCHAR2(20)
    FACILITY_ID VARCHAR2(20)
    INTRODUCTION_DATE TIMESTAMP(6)
    SUPPORT_DISCONTINUATION_DATE TIMESTAMP(6)
    SALES_DISCONTINUATION_DATE TIMESTAMP(6)
    SALES_DISC_WHEN_NOT_AVAIL CHAR(1)
    INTERNAL_NAME VARCHAR2(255)
    BRAND_NAME VARCHAR2(100)
    COMMENTS VARCHAR2(255)
    =========
    CREATE TABLE PROD_CONFIG_PROD_CONFIG_OPTION (
    PRODUCT_ID VARCHAR2(20),
    CONFIG_ITEM_ID VARCHAR2(20),
    CONFIG_OPTION_ID VARCHAR2(20),
    PAGE_NUM_TO NUMBER(18),
    ALTERNATE_PAGE_NUM_TO1 NUMBER(18),
    ALTERNATE_PAGE_NUM_TO2 NUMBER(18),
    ALTERNATE_PAGE_NUM_TO3 NUMBER(18),
    LAST_UPDATED_STAMP TIMESTAMP(6),
    LAST_UPDATED_TX_STAMP TIMESTAMP(6),
    CREATED_STAMP TIMESTAMP(6),
    CREATED_TX_STAMP TIMESTAMP(6),
    CONSTRAINT PK_PROD_CAT_CONFIG_MOD PRIMARY KEY (PRODUCT_ID),
    CONSTRAINT FK_PRODUCT_ID FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCT(PRODUCT_ID),
    CONSTRAINT FK_CONFIG_ITEM_ID FOREIGN KEY (CONFIG_ITEM_ID) REFERENCES PRODUCT_CONFIG_ITEM(CONFIG_ITEM_ID),
    CONSTRAINT FK_CONFIG_OPTION_ID FOREIGN KEY (CONFIG_OPTION_ID) REFERENCES PRODUCT_CONFIG_OPTION(CONFIG_OPTION_ID) )
    TABLESPACE DATA_SMALL
    i try to create this table if i omit 3rd foreign key constraint then table successfully created.but including trd foreign key constraint it return error "ORA-02270: no matching unique or primary key for this column-list"
    i checked everything is it possible to create foreign key from composite key in other table.

    And
    CONSTRAINT FK_CONFIG_OPTION_ID FOREIGN KEY (CONFIG_ITEM_ID,CONFIG_OPTION_ID) REFERENCES PRODUCT_CONFIG_OPTION(CONFIG_ITEM_ID,CONFIG_OPTION_ID)
    ?

  • Is it possible to create an activity from the Agenda?

    Hi Experts,
    We noticed that it's possible to create a note from SSC1 Tcode but not an activity.
    When we create an activity (appointment), it appears in the agenda but  we can't manage to create it from the agenda.
    Is there any possibilities ?
    Many Thanks
    Laurent

    Hi,
    You can create the activity by double clicking on appointment calendar.
    Go to Tcode : crmd_order and select calendar tab.Double click on any time of the calendar and select the appropriate transaction type for activity.
    Then you will be able to create the activity.
    If helpful kindly reward me.
    Thanks & Regards,
    Anirban

  • Is it possible to create an account from Switzerland ?

    Is it possible to create an account from Switzerland ?

    Sure - Switzerland is on the list of countries supported for purchasing a subscription.  You can sign up for a Free or Paid account from Switzerland, in general for purchasing a subscription you just need to have a credit card with the billing address in any of the following countries: In which countries is FormsCentral available for purchase?
    Thanks,
    Josh

  • Possible to create an object from a String?

    Hi,
    is is somehow at all possible to create an object from a String ?
    If we have etc.
    String txt = "Carrot()";
    Is it then possible to somehow cast that String and interpret it as a class type that it should make an object of ?
    Like
    new txt; - would then give me the same as new Carrot(); ?
    Hope you understand what i mean.
    Martin From... :-)

    Class.forName("some.package.Carrot");

  • DOM - create new document from part of other document

    Hi.
    How to create a document from part (sub tree) of the other document?
    document 1.
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
    <meta1>blaa blaa</meta1>
    <meta2>blaa2 blaa2</meta2>
    <data>
    <info>
    <name></name>
    </info>
    </data>
    </root>
    document 2 shuold be:
    <?xml version="1.0" encoding="UTF-8"?>
    <data>
    <info>
    <name></name>
    </info>
    </data>
    Or can I just remove root and meta elements?

    Something like this:DocumentBuilder db = // create a DocumentBuilder;
    Document newDoc = db.newDocument();
    Node newRoot = // the Element you want to be the root of the new document;
    Node root = newDoc.adoptNode(newRoot);
    newDoc.appendChild(root);

  • Automator: Create new folders from .csv file and put images inside.

    I have a challenging Automator task to achieve. I need to
    1) create a set of folders labeled with the contents in column A of a csv file. (example: column A1 JoeBrown A2 SuzyBrown A3 JimBrown etc..) resulting in
    3 folders titled JoeBrown, SuzyBrown, and JimBrown
    2) take the image represented by an image number in column B of the same csv file and move that file into the folder that was created (example: A1 JoeBrown gets a folder created by the name JoBrown and column B IMG_1234.jpg is physically moved from within the same folder as the .csv file into the folder created by column A.
    Both the csv and img files would be in the same folder. I have the script to create a set of folders from a csv list just can't complete the moving of files based on the contents of column B.
    SUMMARY: I have a folder containing several images img_0001, img_0002, img_0003 etc. and a csv file that contains columnA a series of names and column B a series of jpg image numbers. I need to have a script that will create folders labeled whatever name is in column A (see the script below. it works great!) then move the images from column B to the folders generated from column A.
    The csv script is:
    tell application "Finder"
      set mgFolder to container of mgCSVfile as string
      repeat with x from 1 to count paragraphs of mgList
        set text item delimiters of AppleScript to ","
        set mgThisList to text items of paragraph x of mgList as list
        set text item delimiters of AppleScript to ""
        set mgTopFolder to item 1 of mgThisList
        if (exists folder mgTopFolder of folder mgFolder) is false then
          make new folder at mgFolder with properties {name:mgTopFolder}
        end if
        set mgNewFolder to (folder mgTopFolder of folder mgFolder) as alias
        repeat with i from 2 to count mgThisList
          if item i of mgThisList is not "" then
            set mgSubFolder to item i of mgThisList
            if (exists folder mgSubFolder of folder mgNewFolder) is false then
              make new folder at mgNewFolder with properties {name:mgSubFolder}
            end if
          end if
        end repeat
      end repeat
    end tell
    Thanks for any help that may come my way.

    This should work
    (assumes a true "," seperated file with only two items per line, i.e.: Test,Test.jpg):
    The Run Shell Script Action is:
    cd "${1%/*}"
    while read line         
    do         
         FolderName=${line%,*}
         ImageName=${line#*,}
         mkdir "$FolderName"
         mv "$ImageName" "$FolderName"
    done < "$1"

  • I'm attempting to create a pdf from InDesign and the Illustrator image does not appear properly.

    I'm attempting to create a pdf from InDesign and the Illustrator logo does not appear properly. The logo has a light blue color background with a black to white gradiant over it with a multiply designation set at 100%.  I flattened the logo in illustrator before importing into InDesign. When the pdf is created, the blue background of the logo drops out and the only thing showing is the graduated screen of black. PLEASE HELP!!!!!!

    Thanks for your reply Peter,
    I'm on Mac OSX (10.5.8) using Acrobat 7 Professional and Acrobat 
    Reader 9 to view the pdf. I created it by exporting. Attached is a 
    screen capture of the letterhead. Since I posted, I sent a test pdf to 
    my partner's computer eventhough it didn't look right on my system and 
    she said it looked fine to her. I've restarted my computer and tried 
    again and still get the same results.
    Thanks for your help,
    Pat Boullion
    Boullion Graphics
    281 444-5749
    Fax: 281 444-6507
    CONFIDENTIALITY NOTICE
    The information in this email may be confidential and/or privileged. 
    This email is intended to be reviewed by only the individual or 
    organization named above.
    If you are not the intended recipient or an authorized representative 
    of the intended recipient, you are hereby notified that any review, 
    dissemination or copying of this email and its attachments, if any, or 
    the information contained herein is prohibited. If you have received 
    this email in error, please immediately notify the sender by return 
    email and delete this email from your system.

  • Is it possible to create a contact from information in a spreadsheet?

    I have a numbers spreadsheet with name, address, phone numbers, email address, etc. for 100 people. Is it possible to create cards in my Contacts without retyping the information?

    Well, this is much easier than I thought.
    As long as you have a Numbers file structured as follows:
    (you can have more info, i.e 2nd tel# email, etc)
    In Numbers, File->Export to->CSV FIle
    Then in Contacts, all you need to do is File->Import, and select the csv file,
    and you'll be given a choice of how to fill in the data to Contacts:
    First, Backup (Contact->File->Export...->Contacts Archive), so if somthig goes wrong with the import, you can start over at square one.

  • Generating full-size image from thumbnail using BLOB DB images

    Hi all,
    Assuming that all necessary steps were taken in other posts and tutorials to display images on a web page from BLOB objects stored in an Oracle 10g DB, how is it possible to set the size of the created images (from the servlet that creates the image file from BLOB) so that it is smaller than the actual image in the DB. the user would then have to click the image to open the full image.
    would this be done by possibly creating 2 servlets, one that displays a smaller version, and one that displays the actual image?
    i don't see how this can be done since the url property of each image is bound to the url of the servlet. If the thumbnail has a url pointing to image produced by thumbnail servlet, would i assign an action handler for clicking the image that redirects to a url given by the full size image servlet? or should i use an image hyperlink instead?
    any help is always appreciated!

    Suggest you take this one step at a time.
    1. Create a database and store your images in it. (Or write the upload mechanism if you need it).
    2. Display your full size images.
    3. Display your full size images as thumbnail size. (Performance will not be good but you'll have results.) Creator allows you to set image size independantly of the size of the underlying image.
    4. Modify the servlet you wrote in step three to optionally reduce the resolution (or quality) based on an input parameter.
    References: Steps 1 -3
    http://blogs.sun.com/sakthi/entry/how_to_upload_and_retrieve
    Step 4
    http://java.sun.com/developer/onlineTraining/javaai/jai/RenderableScaleFrame.html
    Or possibly some other library.

  • Linking an image from one page to an image within a slideshow on another page.

    I would like to link an image on my home page with an image within a slideshow on another page of my website. I can create the link, but when I click on the link, instead of taking me to the image within the slideshow, it takes me to the first image of the slideshow which I don't want. Is there a way to link to an image "within" the slideshow and not the first image?

    Hi
    You can create pages with specific images and then use link of images which will open the page with that specific image, link images within slideshow to show exact image within would not be possible with native Muse feature as by default slideshow will open the first image in target.
    Thanks,
    Sanjit

  • Drag and drop images from the OS or select images over filebrowser

    Hello,
    I want to create an image upload tool in JavaFX with similar functionality like Jumploader (http://jumploader.com/). The users should be able to select images from the filesystem that will be resized and uploaded to their website, similar as in Facebook. The difference is that I want users to be able to crop images directly in my application. This is something, other upload tools do not offer.
    I was searching weeks on the web trying to find a sample on how to drag and drop images in to a JavaFX 1.3.1 app or also to create a file browser. I have found many examples but they seem to be outdated. Is it to early yet to try and start projects like these with JavaFX as JavaFX is still under development? Or can anybody lead me in to the right direction?
    Thanks,
    Chris

    To be more precise, you can setup a JComponent or JPanel on top of your JavaFX nodes that has a TransferHandler that can convert the (AWT/Swing) images dragged to the app to JavaFX image and then insert it into the underlying node.
    As for the file chooser itselft: ListView and the JavaFX composer can allow you to create one quite easily. TreeView can aslso be used to a lesser extend (still a big buggy). For both of these, there are small bugs in the Cell API that may (or may not) prevent from displaying a proper thumbnail in the cells.
    You can also use a regular JFileChooser if you do not mind the dialog box having a different LnF from the rest of your application.

  • Grabing images from & Apply OCR To that image

    Hi,
    I m developing a sample application on OCR. At last visit i m posting the same question.But no one can answer me.
    Here i Create a Vi for grabbing images from camera. The Images are grab & save to the desired folder.But the OCR is not working on that snap image.
    I m  modified some Sample NI VI's for capturing the images & for OCR.
    I m new for labview. I cant understand where is the problem in the VI.
    i also create a character set file for reading the characters using OCR Training.
    so please help me to find the solution.
    Attachments:
    Character reading.vi ‏91 KB

    HI.
    Let me give some suggestions regarding your code, (See pictures), and attached an example that you could serve.
    Regards.
    Jonathan Cruz
    CHALLENGER
    K U D O S __ B I E N V E N I D O S
    Attachments:
    Camara OCR.vi ‏42 KB
    11.JPG ‏77 KB
    22.JPG ‏17 KB

  • Making 3channel 32 bit images from 1 channel 8 bit images ( channel combining)

    Hi guys
    Although I have a simple problem, i could not solve it yet.
    I am tring to combine opencv and labview by using .dll.I succesfully process and read  8bit images from opencv to display on labview as a 8bit images.
    My problem encounters here. When i try to process 3 different 8bit images in opencv and display them as a single 3 channel RGB image, labview can not read image properly.
    I also think that can I combine these 3 different 8bit images in labview not in opencv? is there any .vi that can merge 3 8bit images and produces single 32bit RGB image?
    Thanks
    Baris Togrul
    I am sending my .vi,my dll. and my opencv function.it may give a idea. 
    IBO2_API int Convolution_OpenCV_NI (char* LVImagePtrSrc, int LVLineWidthSrc,
    char* LVImagePtrDst, int LVLineWidthDst,
    int LVWidth, int LVHeight)
    IplImage *CVImageSrc, *CVImageDst;
    //Create OpenCV headers and set pointers/geometry from LabVIEW:
    CVImagesrc=cvCreateImage( cvSize(LVWidth, LVHeight), 8, 4);
    CVImageSrc->imageData = LVImagePtrSrc;
    CVImageSrc->widthStep = LVLineWidthSrc;
    CVImageDst = cvCreateImage( cvSize(LVWidth, LVHeight), 8, 4);
    CVImageDst->imageData = LVImagePtrDst;
    CVImageDst->widthStep = LVLineWidthDst;
    //Create convolution kernel:
    cvSmooth(CVImageSrc,CVImageDst,CV_BLUR,3,3,0,0);
    return 0;
     by the way I am using opencv 2.1
    Attachments:
    opencv-labview.zip ‏22 KB

    Is this what you want? I saved it to LV2010.
    It lets you initialize the three planes to different colors and then merges them into a color RGB image.
    Attachments:
    IMAQ RGB planes to RGB image.vi ‏45 KB

Maybe you are looking for

  • Adding a raid to an 8-core

    Hi everyone! Was wondering if anyone could provide me with helpful links to info regarding adding a RAID to my 8-core. Right now all I have is the stock 250GB HD. Would like to start out and make a 2-drive raid with a couple of raptor 150s. I have no

  • Is it normal for Firefox Mobile to refresh the Android home screen?

    Firefox always causes my Android home screen to refresh every time I close out of it. Why does this happen is it normal? Note: I have an HTC Merge. this happens even with a fresh install of FF with no add on's.

  • IPhoto Time/Date Change problem

    There is one particular event in my iPhoto program that registered the wrong date when downloaded.  In trying to change it, the program automatically sets the date about 130 years earlier, regardless of what date I type in.  It only happens with this

  • Embeded Flash movies in Flex app

    Hi, Flex noob with no real Flash experience. I have successfully loaded a Flash analogue clock swf file into an app I'm experimenting with in Flex. I used the image tag and is works well. I would like to also embed a Flash movie which is a news scrol

  • Problems with the Z1

    Hi Everyone, Ive had my z1 since around it launched but there are still a bunch of problems with it i wondered if anyone had the same issues susch, . Lock screen flickering, . volume buttons on headphones/earphones not working,. . music sometimes pau