Create an Image

Hie.. i've browse through the forum to search a solution to my problem but i dont find any resourceful. I hope someone could help me out. Here is the problem :-
I tried to create an Image using byte of array as such :-
** the message is in byte
currentImage = Image.createImage(message,0,message.length);
imageItem = new ImageItem("Default", currentImage,
imageItem.LAYOUT_CENTER,"image");
But i got this error message :-
java.lang.IllegalArgumentException:
     at javax.microedition.lcdui.ImmutableImage.<init>(+11)
     at javax.microedition.lcdui.Image.createImage(+40)
     at showReceivedMessage.<init>(+155)
     at Register.displayReceivedMessage(+23)
     at ReceiveMessage.notifyMessage(+279)
     at j.notifyRequest(+391)
     at gov.nist.microedition.sip.SipConnectionNotifierImpl.a(+33)
     at gov.nist.microedition.sip.StackConnector.processRequest(+106)
     at gov.nist.siplite.EventScanner.run(+389)
I suppose the error message mean i'd had passed an illegal argument for an immutableImage but i already make sure that its all correct yet still get thismessage. Please help as i've look into this for weeks.. :(

Hi
It means that your layout value is not legal. Also, try using this instead: currentImage = Image.createImage(message,0,message.length);
imageItem = new ImageItem("Default", currentImage, 0, "image");Also, you might want to try using ImageItem.LAYOUT_CENTER instead of imageItem.LAYOUT_CENTERMihai

Similar Messages

  • Which is the best app to create cartoon images on that i can move around to other apps and animate to create cartoons

    which is the best app to create cartoon images on that I can move around to other apps and animate.  I want to create the image only, no background or anything

    Hi Susan,
    Kindly check out Flash pro CC
    For more details: Explore Adobe desktop apps | Adobe Creative Cloud
    Thanks,
    Atul Saini

  • 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? 

  • Class casting, creating an image and decompiling...

    Hi, I've got a couple of questions:
    1)
    How can I fully decompile classes, so with the implementation of the methods? Is it always possible to fully decompile a class file? When is it and when not?
    2)
    I aks this questions before, but I still haven't got it working, so sorry, but I ask it again :) :
    I want to create my own class, for example cMyClass which extends the java.awt.Image class, which has abstract methods. How do these methods(for example getGraphics etc) have to be implemented?
    3)
    I can't cast a Image to cMyClass... why not?
    Someone told me he did the following:
    Canvas c = new Canvas()
    cMyClass oImage = (cMyClass) c.createImage (100, 100);
    and that this worked... I tried to do this too, and it seemed to work, but it actually didn't!!
    I found out that c.createImage returns a null reference!!! That's why Java was able to cast it to my own cMyClass (not a problem to cast a null to something else), but when I created a Image (by doing a lot of unnessacary difficult stuff), and then tried to cast this Image to cMyClass it throw a ClassCastException or something like that...
    How can I cast the java.awt.Image class to my class anyway?
    3)
    Why can't you create a image like i've done above or even like below:
    Canvas c = new Canvas()
    Image oImage = c.createImage (100, 100);
    Why does this return a null reference?
    Isn't there a better way to create an image?
    4)
    The getWidth and getHeight need a I thought observer...? Why is this? I just want the width and height and don't have an observer or something like that. Is there a way around this?
    I tried getWidth(null) but this returns -1
    Please help! :)

    Hi, I've got a couple of questions:
    1)
    How can I fully decompile classes, so with the
    implementation of the methods? Is it always possible
    to fully decompile a class file? When is it and when
    not?You can always get a dump of the bytecode with 'javap -c'. If you don't want to figure things out yourself, try searching google for a class file decompiler, possibly a de-obfuscator.
    De-compilation is completely possible if the original author wanted that, by including debugging information. Depending on the degree of such information and the amount of code obfuscation, the decompiled code may lack variable names, line numbers, field and method names, class names, and even code structure. Names and line numbers are usually not re-creatable automatically, since the information is simply lost, but you can replace them with your own strings when analyzing an unknown class file (using the correct tools). Re-creating the original code structure may work in some cases, but to me the general case looks rather close to the halt problem (i.e. not solvable).
    Use a de-obfuscator, hope you've got good luck, and analyze the bytecode manually if that doesn't work.
    2)
    I aks this questions before, but I still haven't got
    it working, so sorry, but I ask it again :) :
    I want to create my own class, for example cMyClass
    which extends the java.awt.Image class, which has
    abstract methods. How do these methods(for example
    getGraphics etc) have to be implemented?I don't really understand the problem. 'abstract' means on the language level that your subclass must provide an implementation, i.e. a method body. What that method is expected to do is explained in the javadocs for Image. But in fact you're free to do anything. You could play a sound in the getWidth() method (replace with any method name if you want). Just consider the fact that a lot of code calls getWidth in the hope of getting the width of the image, not playing a sound. So much about the language level.
    On a higher level, a subclass of Image should implement a certain way to describe an image. AFAIK this means that your code must know the size of the image and know how to produce the pixels of the image. I can't tell you in general how you must do this, because it depends on your special case. This boils down to the question, why do you want to write a subclass of 'Image'? What new way of describing and image have you come up with?
    3)
    I can't cast a Image to cMyClass... why not?Simple, and that's certainly not an ALT. Because that specific Image is not a cMyClass. It's probably a BufferedImage or similar that was produced by AWT.
    Please read the specs carefully what casting is about.
    Someone told me he did the following:
    Canvas c = new Canvas()
    cMyClass oImage = (cMyClass) c.createImage (100,
    100);
    and that this worked... I tried to do this too, and it
    seemed to work, but it actually didn't!!
    I found out that c.createImage returns a null
    reference!!! That's why Java was able to cast it to my
    own cMyClass (not a problem to cast a null to
    something else), but when I created a Image (by doing
    a lot of unnessacary difficult stuff), and then tried
    to cast this Image to cMyClass it throw a
    ClassCastException or something like that...
    How can I cast the java.awt.Image class to my class
    anyway?You can't, and if you understood casting then you'd understand that it wouldn't make sense.
    3, 4(don't know)
    Maybe stupid question, but for example the BufferedImage, is this
    completly written in Java?
    How is the link made between the OS+hardware and the Java code? I
    mean, displaying images etc. is very platform dependend not?Look for JNI (Java Native Interface). It's a way to link native (e.g. C) code with Java code.

  • Unable to create Disc Image from DVD

    I get the following error when trying to make a copy of a family wedding DVD. I'm using Disc Utility and creating the image as a DVD/CD master (.cdr) file. It gets to about 3/4 of the way and then gives the following error.
    The internal drive is a PIONEER DVD-RW DVR-K05
    Sep 10 22:13:24: Disk Utility started.
    Creating Image “Wedding of xxx & xxx.cdr”
    Reading VOLUME_IDENTIFIER (Apple_UDF : 0)...
    Unable to create “Wedding of Sarah & Federico.cdr” - Input/output error.
    I've tried twice now and the same error. Looks like I might have to use Toast/Popcorn etc?
    Thanks,
    Darren
    iMac G5 2.1GHz 1Gb RAM 260Gb HDD   Mac OS X (10.4.7)  

    I do not know what that error means. However, if you open up the Disk Utility & go into it's Help Menu & in the search field type duplicating a CD or DVD. There you will find detailed instructions on how to create a disc image from a DVD.
    Good possibility your answer may be found there and/or there may have been something you missed in creating a disc image.
    Good luck.

  • 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.

  • Problem in creating 1 image using differnt images

    Dear Fellows I want to create an image by using different images in byte array format. Images may be transparent or normal images. I want final result in byte array. I am using the following technique which is working fine but the problem with this technique is that it takes too much time to create an image. This is because I am using MediaTraker. If I delete the code of MediaTracker then program have undeterministic behavior i.e, sometimes it create the final image properly and sometimes nothing is displayed in final image.
    I need some help from you. If anyone of you know the technique to draw image using different images without using mediaTracker kindly let me know.
    Early replies will be appreciated
    // here is the sample code which i m using for creating image
    byte[] backgroundImage= // read 800 X 600 image from disk and convert it in to byte array
    byte[] image1 = // read 200 X 200 image from disk and convert it in to byte array
    byte[] transparentImage // read 300 X 300 transparent image from disk and convert it in to byte array
    Image img=null;
    Frame frame =new Frame();
    frame.addNotify();
    //creating BufferedImage object to store Final image
    BufferedImage requiredImage= new BufferedImage(800,600,BufferedImage.SCALE_SMOOTH);
    //get Graphics of BufferedImage created above
    Graphics2D g=(Graphics2D) requiredImage.getGraphics();
    ///// begin draw back ground image
    img=Toolkit.getDefaultToolkit().createImage(backgroundImage);
    try
    MediaTracker mt = new MediaTracker(frame);
    mt.addImage(img, 0); // adds image with ID 0
    mt.waitForID(0);
    }catch(Exception myex)
    myex.printStackTrace();
    //draw background starting from x=0, y=0 with 800 X 600 dimentions
    g.drawImage(img,0,0,800,600,null);
    ////////// end draw background image
    ////////// begin draw image1
    img=Toolkit.getDefaultToolkit().createImage(image1);
    try
    MediaTracker mt = new MediaTracker(frame);
    mt.addImage(img, 0); // adds image with ID 0
    mt.waitForID(0);
    }catch(Exception myex)
    myex.printStackTrace();
    //draw image1 starting from x=10, y=10 with 200 X 200 dimentions
    g.drawImage(img,10,10,200,200,null);
    //////////// end draw image1
    //////begin transparentImage
    img=Toolkit.getDefaultToolkit().createImage(backData);
    try
    MediaTracker mt = new MediaTracker(frame);
    mt.addImage(img, 0); // adds image with ID 0
    mt.waitForID(0);
    }catch(Exception myex)
    myex.printStackTrace();
    //draw transparentImage starting from x=400, y=0 with 300 X 300 dimentions
    g.drawImage(img,400,0,300,300,null);
    ///end draw transparent image
    byte []finalResult = //convert requiredImage into byte array;
    you can mail me the solution on my email address [email protected]
    thanks with best regards
    and waiting for someone to reply
    kamran zameer

    is there anyone on this forum to help me??????
    regards,
    kamran zameer

  • Is there a way to create an image of a CC installer that way I can install without internet?

    I work for a college that has a department of over 100 mac computers currently runing 10.6 and above. I am the IT here and am in charge of installing all programs the students use, so ease of installation helps. I know I can install using an internet connection and it seems pretty simple, my issue is that if for some reason I dont have internet connection in the department I wouldnt be able to install the programs. What I want to know is if I can somehow create an image for the CC softwares, such as Photoshop CC, that way I can create more images of that installer, put them onto external hardrives and install that way without using internet. hope thats enough information, thanks for the help.

    Direct Download Links for Adobe Software
    For proper deployment, sign up with the dev center/ enterprise deployment.
    Mylenium

  • Creating an image from a Mac and restoring it in another Mac

    Hi,
    I've spent a couple of hours trying to make a copy of one of my macminis, trying to copy it in another macmini to have the SAME machine "duplicated".
    I've read some tutorials online, but something is going wrong....
    First of all, I went to my "master" macmini, DiskUtility, create new image from folder, select my macintosh HD and I created the image of the whole HD.
    Almost a hour after, the image was created.
    Then I moved the .dmg to a USB drive, and I connected the USB pen to the machine that I want to be a "clone" of the master. There, I opened Disk Utility, Restore, I selected the Source image from my USB, but I can't selected (=drag) the Macintosh HD into the "destination" field...
    What I'm doing wrong?
    Thanks, any help is appreciated :))

    Hi sr.richie;
    If you are booted from Macintosh HD then the system will not allow this cloning operation to take place. You must boot from another disk in order to do that.
    Allan

  • Is there any way to create this image in photoshop?

    Is there any way to create this image in photoshop?  ,Any help would be appreciated?

    What JJMack said. An example I pulled in less than 5 minutes:
    All I did was inserted a text layer with that same inside color and a stroke layer style with that same outside color (about 3 or 4 pixels; outside position). Font used was Calibri Regular.

  • What's the best way to create disk images?

    of 300GB  hard drives or partitions?
    Disk utility is failing for me with an input/output error.
    A typical example:
    I have a new HFS+ 500GB external FW 800 drive that I am using a destination.
    I will boot from my original 'install' DVD and then open up disk utility to start the disk image creation.
    Note: my source is my "Macintosh HD" partition that is around 300GB.
    Everything looks like it is running well, then a couple hours into it, it fails... something like:
    "cannot create img.. blah input/output error".
    Note: Verify Disk shows no errors on the source.
    One guess is that the img creation process is failing after I leave the computer and perhaps my computer falls asleep. I tried setting the 'Energy Saver' prefs in the systems prefs, but of course, since I'm running off the install DVD, I wasn't able to get into the prefs.
    Anyway, ultimately, I need to create periodic disk images of my macs.. so what are people using to do this?
    Thanks for the comments!
    Donovan

    Eric, Carbon Copy Cloner is what I was leaning towards. The owner says his guess is that there are bad blocks on my HD, and since Disk Utility is block based, that it is failing where CCC is file based, and will just skip files that are corrupted or that it can't copy.
    I guess I'll roll with that for now.. but it would be nice if the Disk Utility logs spit out a more descriptive log.. instead of "could not create disk image, input/output error".
    Thanks!
    Donovan

  • How to create transparent image at run-time?

    How to create transparent image at run-time? I mean I want to create a (new) transparent image1, then show other (loaded) transparent image2 to image1, then show image1 to a DC. The problem is - image1 has non-transparent background...

    i'm not sure, but you can set the alpha value to 0 in all pixels which are 'in' the background..
    greetz
    chris

  • System Image Utility fails to create boot image

    I am not able to successfully build a boot image with the System Image Utility. The build starts and runs for about 1 minute and then I get 100's of ditto messages saying "No space left on device". There's plenty of space left on the device. Eventually I get a GUI message stating the there was an error creating the image. The image is of course unusable. This only happens on a Boot image. I have no problem making an install image from the same source. Is it just me??
    Xserve G5 Dual   Mac OS X (10.4.5)  

    I had simililar problems with much headscratching as the result.
    I found that whenever I tried to create a boot image with System Image Utility (SIU) using an image file of my existing system as the source SIU would fail with the annoying "No space left on device" message everytime. I did a little investigating and found that SIU always created a 400 MB disk image file to copy to. So the error message was correct as my source was way over 4 GB.
    I checked the manual and found the embarrasingly simple solution. It's not mentioned directly, rather it is stated that when you want to create an boot image from an existing system you should boot the machine containing the desired system on disk from an alternate source and the run SIU on that machine. The "trick" is that you're running SIU with the existing system mounted as a disk.
    So I went back to my Xserve, mounted the image so it appeared on the desktop. Ran SIU and chose the mounted volume as the source instead of the image file, and hey presto!
    MacBook Pro, Xserve, eMac, iMac... any Mac I can get my hands on   Mac OS X (10.4.6)  

  • System Image Utility 10.6.3 - fails when creating NetBoot image from DVD

    System Image Utility 10.6.3, trying to create a NetBoot image from a bundled installer disc that came with a 27" Late 2009 iMac (iMac11,1). Image creation fails consistently, since the image that System Image Utility creates is only 901M.
    Anyone see this before?
    Don
    --------- System Image Utility log ----------
    Workflow Started (2010-06-16 14:03:02 -0700)
    Starting action: Define Image Source
    Finished running action: Define Image Source
    Starting action: Create Image
    Starting image creation process...
    Create NetBoot Image
    Initiating NetBoot from Install Media.
    Creating working path at /Library/NetBoot/NetBootSP0/NetBoot of Mac OS X Install DVD
    Creating disk image (Size: 901 MB)
    Finalizing disk image.
    created: /Library/NetBoot/NetBootSP0/NetBoot of Mac OS X Install DVD/NetBoot.dmg
    Attaching disk image
    Installing to destination volume
    2010-06-16 14:03:38.126 installer[2365:6f03] Looking for system packages
    2010-06-16 14:03:38.129 installer[2365:6f03] no system packages found
    2010-06-16 14:03:38.130 installer[2365:6f03] No or Invalid system receipts found on /private/tmp/mnt.LjFArn
    2010-06-16 14:03:38.130 installer[2365:6f03] Attempting fallback using: /System/Library/PrivateFrameworks/SystemMigration.framework/Resources/FallbackS ystemFiles.plist
    2010-06-16 14:03:38.175 installer[2365:6f03] Finding system files...
    2010-06-16 14:03:38.619 installer[2365:6f03] Writing system path cache.
    2010-06-16 14:03:38.623 installer[2365:6f03] Error writing cache to /private/tmp/mnt.LjFArn/Library/Caches/com.apple.FindSystemFiles.plist
    2010-06-16 14:03:38.625 installer[2365:6f03] Failed to enumerate /tmp/mnt.LjFArn/Library/Caches, cannot prune (
    "com.apple.userpictureCache"
    installer: Package name is Mac OS X
    installer: Installing at base path /private/tmp/mnt.LjFArn
    installer: The install failed (There is not enough space on this disk to install the selected items. Deselect at least 6.46 GB and try again.)
    Script is done.
    NetBoot creation failed.
    Image creation process finished...
    Stopping image creation.
    Image creation failed.

    Brian Nesse wrote:
    Hi Don, here's my guess...
    The 901 number is additional space added in the scripts. This indicates that the source image size was 0.
    Since you are making a NetBoot from Install media, under the covers the installer process is being run to create a NetBoot volume. The media shipped with the 27" iMac is most likely CPU specific and thus the installation fails because you are trying to create the image (i.e. install the system) on an unsupported CPU.
    In order to produce a NetBoot from the install media, you'll have to create it on the 27" iMac.
    Hi Brian,
    Thanks for the response. This makes perfect sense. I'll give this a try and shout back!
    Thanks,
    Don

  • Disk Utility Error 61 when attempting to create disk image on external driv

    I would like to make occasional archive backups of my three macintosh computers. I bought a new Western Digital 2TB drive for this purpose, and formatted it as Mac OS Extended. Trying to do a disk image backup using Disk Utility, I follow the directions:
    - Startup from an install DVD.
    - Start Disk Utilities and select "Restore"
    - Drag "Macintosh HD" into the Source box
    - Click on "New Image" and select compressed and 128-bit AES encryption
    This leads to the error message: Unable to create "....." (error -61)
    I have enocountered this problem both with my iMac G5 and a MacBook, both running Leopard.
    Does anyone know what this error means, what I am doing wrong, and/or if there is another way to create disk image backups? Help!

    1. For reasons I don't know disc images seem to become more fragile the larger they get. They also can be subject to file corruption that affects the entire disc image, whereas file corruption on a clone would only affect certain files.
    2. You cannot put multiple clones on the same volume. Each clone must be on a separate volume, but you can have multiple volumes on a single drive simply by partitioning the drive accordingly. Of course you need a drive large enough to accommodate each clone. Each clone should be to a space equal to the capacity of the cloned drive.
    3. I'm not a big fan of TM, although I must confess it has become more reliable since it's release, especially with Snow Leopard. However, there are many backup utilities that can create clones, perform incremental updates, and archive changed files. See the following:
    Backup Software Recommendations
    Carbon Copy Cloner
    Data Backup
    Deja Vu
    Silver Keeper
    MimMac
    Retrospect
    Super Flexible File Synchronizer
    SuperDuper!
    Synchronize Pro! X
    Synk Pro
    Synk Standard
    Tri-Backup
    Others may be found at VersionTracker or MacUpdate.
    Visit The XLab FAQs and read the FAQ on backup and restore. Also read How to Back Up and Restore Your Files.

  • Disk Utility create new image question

    In the side bar of Disk Utility, it lists the devices and then, indented, the names of the disks.  If I want to create an image of an existing DVD, does it matter whether I choose "Upper Superdrive" or the disk title?

    Also, can someone explain the difference bewteen a read-only image and a master image? 

Maybe you are looking for