How to split image ... in MIDP ... ?

Hi all, ...
I'm currently working with MIDP 1.0, i want to make a simple image puzzle game that can split an image into 4 x 4 area, 6 x 6 area or 8 x 8 area ... Can someone give me the trick ... ?
Thank you ...

Image myBigImage = .someCodeThatLoadsTheImage();
Image[][] smallImage = new Image[xSize][ySize];
for(int i = 0; i < xNum; i++){
for(int j = 0;J < yNum; j++){
Image img = Image.createImage(xSize,ySize);
Graphics g = img.getGraphics();
g.drawImage(myBigImage, i * xSize*-1, y * ySize*-1);
smallImage[i][j] = img;
You simply create your small images and then draws the big image on the small image, the most part of the big image will not be seen.
Do a little search about using clips since that is the underlying tecnique here.
Regards
Roland Carlsson

Similar Messages

  • How to split image into smaller (same size) pieces?

    Hi all,
    My question is how to split image into smaller (same size) pieces, using Photoshop elements 13? Could anyone help me with this one?
    Thanks!

    Use the Expert tab in Editor (I think that is what it is called in PSEv.13)
    You may find the grid helpful. Go to View>Grid. It will not print, but will help to orient you. You can set up the gridlines to suit via Edit>Preferences>Guides and Grid. If you want to partition the picture in to 4 uniform pieces, it would be Gridline every 50%, Subdivision 1. Also, go to View>Snap to>Grid.
    Set up the Rectangular marquee tool: If the picture is 6" wide & 4" high, enter width=3in & height=2in.on the tool's option bar. This will be a fixed size.
    Click and select one quadrant, press CTRL+J to place this quadrant on a separate layer
    Repeat for the other 3 quadrants
    You should end up with 5 layers : Background, and layers 1, 2, 3, 4.

  • How to display an image using MIDP on Palm?

    How can I display an image using MIDP on Palm? The following code works on the Siemens SL45i, but not on Palm:
    public class Test extends List
    Image image = Image.createImage("/images/test.png");
    append("item 1", image);

    Have found the exact same problem when trying to display an image (other then the default (null)) in a list, on a Palm.
    The image displays correctly on a form, but when set on an element in the list, it does not display. (mind you this is in both emulator mode and on the real device)
    It does not seem to be related to size of the image.
    The Sun documetation states, that you should not rely on it been displayed (obviously it's an implementation issue with the Palm, and other devices I have not tried)
    But like to hear definitively from Sun though!

  • How to split Windows Vista DVD image?

    I would like to ask how to split windows vista DVD image into specific size using Windows PE Tools Command Prompt.
    Thanks in advanced.

    Hi,
    You can try the following method:
    1.   Install UltraISO and Windows AIK.
    Windows AIK:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=94bb6e34-d890-4932-81a5-5b50c657de08&DisplayLang=en
    2.   Use UltraISO to open the Windows Vista DVD and extract install.wim under the Sources folder to the local hard drive, for example: D:\Vista\sources\install.wim.
    3.   Run Windows PE Tools Command Prompt in elevated mode and type the following command:
    imagex /split D:\vista\sources\install.wim D:\temp\install.swm 380
    Note: D:\vista\sources\install.wim is the name and location of the file which will be split from. D:\temp\install.swm is the name and location of the target file. 380 is each target file size.
    Note: Before doing this, make sure partition D has at least 5GB of free disk space.
    After that, you will get 6 target files named install.swm, install2.swm, install3.swm, install4.swm, install5.swm and install6.swm in D:\temp.
    4.   Use UltraISO to open the Windows Vista DVD. Delete install.wim under the Sources folder and drag install.swm to this folder. Save the whole disk to the local hard drive and we will get CD1.
    5.   Open UltraISO and create a new folder named Sources. Drag install2.swm, install3.swm, install4.swm, install5.swm and install6.swm to the Sources folder. Save install2.swm to the local hard drive and we will get CD2. Use the same method to create CD3, CD4, CD5 and CD6.
    6.   Burn the iso files to CDs.
    The steps above can be a little complex. I recommend obtaining a DVD drive to install Windows Vista.
    Hope it helps.
    Tim Quan - MSFT

  • Merge to Panorama creates a split image of the whole merged image

    When I attempt to create a Panorama using "Merge to Panorama"/Auto with 11 CR2 RAW photos from my Canon 5d Mark ii the result is that I get a split image: 5 photos merged on the top of the canvas, and 6 merged on the bottom. I am using the most recent versions of Photoshop CC 2014 and a Mac Pro with OS 10.9.5. The same thing happens with "Perspective" rather than "Auto". Is there a size limit to how big the merged photo can be?

    Disk Utility>Restore will copy the OSX, the Recovery Partition and ALL user data.  It will be an identical copy of the internal HDD.
    Third party software such as Carbon Copy Cloner can also perform that same function, but also allow for incremental changes.
    Ciao.

  • How to find image centroid & seperation between two images

    How to find image centroid and seperation between the images,
    i have 2 images pixel values as shown in the picture i should calculate the centroid of the image & find the distance of seperation of the image.
    help me how to do this
    I am using LabView 7.1
    thanks
    sk 
    Attachments:
    New Folder.zip ‏736 KB

    I have a center of energy program similar to the one used by IMAQ. I have attached an example using your data. I first found the center of the entire image. Then I split the array in two and found the centers of each half. That gives you the position of the two spots. This program won't work if the spots are too close to each other or are separeted in the other axis.
    Attachments:
    distance between two spots one direction.vi ‏1096 KB
    Center of energy calc.vi ‏40 KB

  • Split image into clickable sections

    Hi, I was wondering if anyone know how to split an image into several clickable sections. I am trying to make the game "Risk", and I am sort of stuck at this problem. I have been thinking of making an individual image button for every country with the respective country as image, but I hope there is a better way to do this. The best would be to just split the world map into country sections.
    Thank you in advance
    OhM

    A naive (but possibly sufficient) implementation could just be to keep a table mapping (x,y) pairs to countries. To keep the table smaller, you could map 10x10 blocks of pixels to countries.
    Ultimately this is about storing and then managing data.
    One hack (in my opinion) is to check the color of the clicked pixel in the image of the map. But that is nasty for a variety of reasons (such as, it keeps you from being able to easily change the map image, and things like text in the map (like the names of countries) kind of screws that up. But it's an option.
    You can also keep lists of pixels in sequence describing a polygon, and then use certain algorithms (which I don't recall right now) to determine whether a given point is inside or outside a given polygon.
    Also you can do things like "binary space partitions", I think.
    These last two things are computer graphics techniques, and are non-trivial to implement. I dimly recall them from college but recall no details. You can get a computer graphics textbook (which tend to be expensive) to get more info, or these days there's probably a wiki about it somewhere.
    But I'd suggest keeping it modular. Add a layer of abstraction, writing an API around this functionality. Then write an implementation with a simple table of locations or blocks of locations, and if this proves to be insufficient later, swap it out with something more sophisticated.

  • How to split screen

    how to split screen

    Get a minidisplayport-to-? adapter.  Replace ? with DVI or VGA or HDMI, as you wish.
    Several in the Apple Online store, or anywhere Apple products are sold (BestBuy, Microcenter, Fry's ...).  Price is the same regardless of purchase site.
    Plug that into the Thunderbolt port.  But do not stack adapters.  Just adapter to cable to monitor, as signal loses strength acress adapters.
    System Preferences > Displays.  Choose arrangement (other screen "above" or "left" or "right" or "below").  Choose "mirror" (same image both displays) or "extended" (different images).  But know that "mirror" means that both monitors will max out at the best resolution of the two (mirror a 1440x900 and 1920x1080 monitor will have both at 1440x900) while extended lets you choose for each.
    <edited by steve359 to add "port" in first line>

  • How to split a line item to 2 line item.

    Hi all !
    I have a request, help me please !
    In system I have a invoice with 1 line item value 1000 USD.
    Customer payment 600$. a incoming payment with value 600$ will post to system.
    I want incoming payment and invoice will auto clear 600$ but system can't auto clearing because value is not Identical.
    I want line item of invoice will split to 2 line item. Line item 1 value 600$ and line item 2 value 400$.
    Line item 1 of invoice will auto clear with incoming payment and system will exist a invoice with 1 line item value 400$.
    How to split a line item to 2 line item ? Have FM for split a line item to 2 line item in SAP ?
    If you have other solution for this request, help me please !
    Thanks !

    Hi,
    Have a look at Split line item - Sales Order
    Regards

  • How to Call Image Viewer from Form application

    Hi,
    how to call Image viewer using host command on oracle form 6i.
    i trying using host command on local/client application .. and it is working ...
    but when i try on server application (EBS - UNIX) it does not working ...
    thanks ..
    regards,
    safar

    Are you using Forms 6i in client/server mode or web deployed? I'm not sure what you mean by 'try on server application"
    Remember that when using a web deployed architecture, a host command will execute the command on the Forms application server, NOT on the client.
    To execute host commands on the client you would have to use WebUtil, but that's not available for Forms 6i. Perhaps there are PJC's out there that can do it for you, but I don't want to get in all those details without me knowing if it is relevant for you.

  • How to use images from ADFLib

    Hello OTN,
    My application is devided into several ADFLibs, one of them is CommonUI. It includes common skin and it is imported into every application part.
    There are some images which should be available in different parts, so I decided to put them in CommonUI.
    After deploying adflibCommonUI adn refreshing Resource Palette, somehow I expected to see this image there, but it isn't.
    Could someone, please, explain me, how to use images contained in imported ADFLib, for example, as imageLink icon?
    Thanks.
    ADF 11.1.2.1

    Hi,
    images need to be saved in a specific file structure in the JAR file to be accessible. See:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/86-images-from-jar-427953.pdf
    Frank

  • How to split all the fields of output ls-l from an internal table

    Hi all,
    Using ls-l command i have brought the file attributes of a file like its read and write permissions,creation date ,path etc in a internal table.
    Now how to split all these fields from the internal table or what should be the splitting criteria.
    The field contents of internal table are like this:
    -rw-rw----    1  devadm     sapsys     18360    apr  29......so on
    I want to split this into different fields.
    Kindly suggest.
    Thank You.

    Hi,
    I think the delimiter will be space. For date alone (Apr 29) you need to concatenate after the string has been split.
    Thanks and regards,
    S. Chandramouli

  • How do you  "image correction" in PREVIEW in a macbook pro? I have an iBook G4 that gives it as an option in the tools drop down window.

    how do you  "image correction" in PREVIEW in a macbook pro? I have an iBook G4 that gives it as an option in the tools drop down window.

    From preview:
    Tools-> Adjust Color-> Auto Levels
    Or you can import the image into iPhoto:
    Edit-> Enhance

  • How to store image in the oracle database 10.2.

    Hi.,
    I am working on 10g ids. I have designed a form where there are two fields. Name and picture.
    I want to keep details of the person with their photo.
    I can simply put name but how to insert image in the picture field??
    can you suggest ??
    Thanks.
    Shyam

    Hi
    To store your binary images in an Oracle database, you will need to create a column in your table defined with the BLOB datatype BLOB stands for Binary Large Object. Images from scanners, mpeg files, movie files and so on can all be stored in the BLOB column
    sq>CREATE TABLE test_table (
       id NUMBER,
       image BLOB);then go to
    [http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10796/toc.htm]

  • I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!

    I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!

    video
    What version of Premiere Elements do you have and on what computer operating system is it running?
    Please review the following workflow.
    ATR Premiere Elements Troubleshooting: PE11: Project Assets Organization for Scene and Highlight Grabs from Collection o…
    But please also determine if your project goal is supported by
    a. format of your source
    and
    b. computer resources
    More later based on details that you will post.
    ATR

Maybe you are looking for