J2ME: Sizing a PNG

Ok..
I can't believe that you can't resize a PNG with J2ME. I just can't believe it!!
Please someone tell me about a way to do it (without spending 2 or 3 weeks by writing my own algorythm).
They should have include something to resize a PNG in J2ME.. this is ridiculous, there are many device with different scren resolution.

So.... nobody knows anything about it?

Similar Messages

  • Problem about Image....

    I want to read image file(like Sample.jpg) and trasform to one half size and save to another file.
    code:
    Image img=Toolkit.getDefaultToolkit().getImage("./Sample.png");
    Image img2=img.getScaledInstance(100,100,SCALE_FAST);
    then I can draw image2....
    but I wan to save image2 to a file(like Sample2.png)...
    How can I do it....
    Can Image class be transfered to byte array?
    Anyway ,my question is how to save a image class to a file in my disk,not only can show it in applet.I want a really file.
    Or in Java solution ,how can I do something changed(like resize)with a PNG(GIF..etc) file and save it to another PNG file.
                   

    sorry..I found the last 3 topic is the same as my question
    .I know how to do it now....But does anyone knows how to save as PNG file.I only can save as JPG or GIF file.Because J2ME only read PNG file,so plz tell me where can I find PNG encoder and decoder.

  • Encore slideshow picture quality

    Importing photograph slides into Encore CS4 the quality of some of them are poor.  They appear in the slideshow viewer and monitor in a poor quality.  I have had them looking like a mosaic and more recently a yellow flag has had black areas with in the yellow.  The pictures have not been manipulated prior to importing.
    I have surched the forums without any success.
    Does anyone have any suggestions, they would be much a appreciated?

    function(){return A.apply(null,[this].concat($A(arguments)))}
    05Stephen104349 wrote:
    Thank you for your reply.
    I am also in PAL land.
    I am new to this widescreen editing so I feel I am a bit lost in the dark.
    I will do some re-sizing but I do not run to Photoshop yet.
    Thanks again for your help.
    If you have Photoshop Elements, that has an automatic batch re-sizing function.  I am fairly sure that XnView, which is free, will do this also.  I am sure that I once came across a free image re-sizing program recently, but cannot recall details.
    Microsoft also offered a free image re-sizer for XP.  This is still available, and will do batch re-sizing.
    To achieve full height TV screen image with no-rescaling within Encore, the image height for PAL needs to be set at 576 pixels - this applies to both portrait and landscape orientated images, so you have to process them separately.  You will still lose a little  at top and bottom displaying them on a conventional TV as they overscan.
    It is better to convert from JPEG to a non-lossy format before re-sizing, either .png, or .psd.

  • Jpg to png in J2ME device..

    I am considering doing a converter that could read JPG images from server and converts then to PNG and shows on device. I wonder what is the basic approach in case like this. I know there is already made solutions for this, but I want to make one in order to understand more these kinds of things.
    Thanks in advance..

    I tried the server route, but a 30kb JPEG becomes a 210kb PNG, and for downloading over the air on a cell phone, that 7x increase is a painful problem. Downloading the JPEG directly to the J2ME device is definitely the way to go. Pretty lame that J2ME doesn't currently support JPEG natively.
    After many nights of searching the Net for an answer to this question, a kind soul pointed me to the following site, which is 80% of the answer we're looking for:
    http://webuser.fh-furtwangen.de/~dersch/
    Helmut Dersch
    has written/ported a JPEG Decoder that can run in J2ME:
    JPEGDecoder: pure-Java JPEG-Decoder for limited Java APIs (e.g. J2ME)I know that it works (he has a sample app that actually runs on my Treo with a panoramic JPEG image loaded from the resource files). Unfortunately, I haven't been smart enough to write the code yet that would download a JPEG off the web and render it on the screen (without all the Panoramic stuff). Should be simple, though.
    I am sure that it will take 90 seconds for one of you smart folks. If you actually write the code to do this, PLEASE post the source code so that all of us will learn!
    Thanks!!!

  • Is there a JPEG encoder for j2me, PNG,GIF and BMP encoders are also wanted.

    As is known that, image encoders are not currently available in MIDP. I have tried to port a j2se JPEG encoder to J2ME, but it cost me 32M memory when generating a 800x600 image. Could anyone help me. Thanks

    well, of course ... what did you expect?Hum, I want to do some processing on my pictures, such as rotation, and then save it or send to my friends via MMS. but it's not easy to save the processed pixels to image file, such as JPEG, GIF or PNG.

  • Put .png on J2ME form?

    Am programmering in Sun One studio 4 me. For 2 days now am I been trying to put a .png picture into a J2ME form without any luck. Can someone plz help me with this? This is how I been trying:
        public void side(String navn)
            Form f = new Form(navn);
            try{
            Image image = Image.createImage("/Duke.png");
            f.append(image);
            }catch(java.io.IOException e){e.printStackTrace();}
            f.addCommand(backCommand);
            f.setCommandListener(this);
            display.setCurrent(f);       
        }The Duke.png is taken from samples that was in the editor so it should be ok.

    Are you getting an exception?
    The path to image is probably wrong. Different developing environments package the MIDlets differently. Try playing around with the path (ie: Image.createImage("res/Duke.png") or Image.createImage("/res/Duke.png")) and make sure the filename is spelled correctly (case sensitive and all).
    shmoove

  • How to export full image in PNG format lying inside a smaller sized rectangle?

    Hi
    In my own created extension for adobe inDesign using CS Extension builder 1.5, I am trying to export a page item lying inside a rectangle frame longer than frame height. Full image is not exported but it gets cropped which is of the rectangle height. I need to get full image exported in PNG format. The item can be text/image/drawing/or group of multiple items lying inside a rectangle frame.
    Sometimes the correct image is exported although the rectangle frame size is smaller than the inside image/item. Following is the code I’m using to export the page item.
    var targetItem:PageItem = pageItem.allPageItems[0];
    targetItem.exportFile(ExportFormat.PNG_FORMAT, targetFile, false);
    Can anybody help me out?
    Thanks and best regards
    Sal

    the answer is at : http://forums.adobe.com/thread/1060138

  • Image is NULL exception, problems displaying a png file

    Hi people,
    I want to display a simple image using j2me on my siemens sl45i emu.
    I'm using the following code to load my png 8x8(created with photoshop, 2bpp) image:
    public void load()
    try
    testImage = Image.createImage("res/enemy1.png");
    catch (Exception e)
    System.err.print("Ladefehler: " + e);
    when I want to display the image using the follwing code:
    private void render(Graphics g)
    g.drawImage(testImage,0,0,0);
    g.drawString("**** you!", 0, 0, Graphics.TOP|Graphics.LEFT);
    I'm getting the following exception:
    java.lang.NullPointerException: Image is null.
    Why do I get this exception when I want to display the image and not when I'm loading the image(something like "couldn't load image..." )....
    I've placed enemy1.png in a folder called "res" in my jar file. Displaying text does work so I don't understand why I can't display an image...
    Any help would be great!
    Thanx in advance, alex

    This can't be possible!
    private void load()
         GameGraphics.getInstance().load();
         Player.getInstance().load();
    I'm printing debug messages in both load()-methods and I'm getting an exception in the player class because gamegraphics didn't finish loading (I can see it from the debugging messages)

  • How to get the Mobile information by using J2ME application

    hi all,
    I am lakshman.I am developing an application in j2me,I want my program compatible to all mobile devices.
    I want to know properties and the device information with the help of a j2me application.I got the information with the help of System.getProperty(String).I found some of the information like sms,videocapture,and some of the values and the variables ... in the following
    platform...null
    encoding...ISO-8859-1
    configuration...CLDC-1.0
    profile...MIDP-2.0
    locale...null
    fileconnection...1.0
    comport...null
    hostname...iwmc-07
    sms...null
    smartcard...null
    location version...null
    sip version...null
    m3gversion...null
    mms...null
    videocapture...false
    videoencoding...null
    snapshotencoding...encoding=png encoding=jpeg encoding=gif encoding=bmp
    audioencoding...null
    supaudcap...false
    suprecod...false
    supmixing...false
    mediaversion...1.1
    streamcont...null
    I want to know these are the only variables or is there are lot...
    Now my question is I want to get the information of the service provider and also the present location that the mobile was present.I think there was some method to get that ...I want to get what firmware it was using .
    Can anybody tell me that way and also the package to get the information
    thanks in advance
    lakshman

    hi all,
    I am lakshman,I found the answer for my question,By using the Location API(jsr179).It was not include in the WTK2.2.for that i have downloaded the WTK2.3 then i have implemented the location api in the application and it was working.
    And I have the following warning...
    Warning: To avoid potential deadlock, operations that may block, such as
    networking, should be performed in a different thread than the
    commandAction() handler.
    I am running the application from my Emulator(by using the default color phone).I have to check that in the device.
    Can any body please give me the way to fix that,i want to test my application from my emulator is that is possible if possible ...how?.what is the procedure to implement..
    thanks in advance

  • Re-sizing and Pasting in Elements 12

    I've just got Elements 12 and I'm having difficulty getting started.
    The first thing I need to do, is to re-size a load of images - I need them to be a specific size in centimetres. I don't care how many pixels they are, or how big the file is.
    However, whenever i try re-sizing, and then open the image in something else, it hasn't really changed size - it's just set to print at that size in elements. As I'm not printing them, I'm sending them digitally elsewhere to be printed, that's no good to me- is there any way to actually change the size.
    Once I've got the images resized, I then want to paste them onto a slightly larger black background. However, I don't seem to be able to paste between files. Is this normal?
    To sum up:
    I have a load of jpegs and pngs of various sizes, I want to get them all to 6.12 x 8.6 cm, then paste them into a black background 6.4 x 9 cm (providing a thin border against the edges being cropped int he printing process) and save as jpegs. These jpegs will then be uploaded to a printing company via the internet.
    I'd hoped this would be a fairly simple process, but it seems to be impossible. Can anyone help?

    For printing, it desirable to have the resolution in the range 240-300px/in.
    You can convert the ruler scale to metric by right clicking on the ruler. This will help you to visualize the dimensions for reference.
    On the crop tool's option bar, enter 6.12cm and 8.6cm for w & h (depending on portrait/landscape orientation.) Enter resolution 240px/in in the resolution field.
    Drag out the crop shield to embrace what you wish to retain, then commit with the green checkmark.
    Set your foreground color chip to black
    Go to Select menu>all
    Open a blank layer above the background layer
    Goto Edit menu>Stroke(outline) selection. Try stroke width 5px, position:inside. OK
    Press CTRL+D to get rid of the marching ants.
    You can adjust the black border (stroke width) to suit - simply delete the layer created in step #5, and replace it.

  • Creating a .jpg image from with in the J2ME app

    Hi,
    I want to send a document to the printer over bluetooth to print.
    For that I searched on net, but couldn't find any APIs supported by J2ME to print it. I also found a link http://www.hcilab.org/documents/tutorials/Brother/ where I found that I can send the data by creating an image and then writing data (text or image ) in to it, and then sending that image to print.
    Image img = Image.createImage(816, 40);
    Graphics g = img.getGraphics();
    g.setColor(0, 0, 0);
    g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD,Font.SIZE_LARGE));
    g.drawString("Printing test from "
                             + System.getProperty("microedition.platform") + " on "
                             + new Date(), 10, 10, 0);
    driver.print(img, btAddr);This code is working fine on this printer.
    I am using HP 460cb printer, and I tried the same thing, but am not getting any results. Can any one of you tell me what mistake am I making.
                    Image blankImage = Image.createImage(SpotBilling.MAX_IMG_WIDTH, SpotBilling.MAX_IMG_HEIGHT);
                    Graphics g = blankImage.getGraphics();
                    g.setColor(0,0,0);
                    g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_SMALL));
                    g.drawString("Printing test on Wednesday - 18th Jan, 2006", 10, 50, Graphics.TOP|Graphics.LEFT);
                    g.drawImage(imgTest, 60, 150, Graphics.HCENTER | Graphics.VCENTER);
                    int width = blankImage.getWidth();
                    int height = blankImage.getHeight();
                    int y = 0;
                    os.write(CMD_UNIVERSAL_EXIT);
                    for(int i = 1; i<=height; i++){
                             blankImage.getRGB(temp, 0, width, 0, y, width, 1);
                             byte[] pixels = new byte[width];
                             for (int x = 0; x < temp.length; x++) {
                                  pixels[x] = (byte) ((((temp[x] & 0x00FF0000) >> 16)
                                       + ((temp[x] & 0x0000FF00) >> 8) + (temp[x] & 0x000000FF)) / 3);
                             // Transfer Raster Graphics
                             os.write(TRANSFER_RASTER_DATA);
                             byte[] len = numToDecimal(pixels.length);
                             os.write(len);
                             os.write(DATA);
                             os.write(pixels);
                             y++;
                        }I have another query, if I can not do this. Is there any way I can create a .jpg image from with in the J2ME application.
    I have some text and an image that I get by invoking camera from the code and then capturing a picture. I need to combine them both, and then send it to the printer.
    If there is any way, I can convert this blankImage mentioned above (containing both text and Image), please provide me the solution.
    Any document or any source code is appreciated.
    regards,
    Ashish

    I have succeeded in creating a mutable image that contains text and image (.png), through
                         Image img;
                         img = Image.createImage(50, 60);
         protected void paint(Graphics g){
              g.drawImage(img, getWidth()/2, getHeight()/2, Graphics.HCENTER | Graphics.VCENTER);
              Graphics graph = img.getGraphics();
              graph.setColor(0, 0, 0);
              graph.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD,
                             Font.SIZE_LARGE));
              graph.drawString("Printing test from "
                                       + System.getProperty("microedition.platform") + " on ", 10, 10, 0);
              graph.drawImage(image, img.getWidth()/2, img.getHeight()/2,Graphics.HCENTER|Graphics.VCENTER);
              graph.fillArc(0,0,10,10,0, 360);
         }Now I want to create a .jpg image of this img image(Mutable image).
    What I am doing is that,
    1. I am converting this image in to int array, using getRGB() method.
    2. Then I am converting int array in to byte array.
    3. And then I am opening a file(extension is .jpg)
    4. Then I am sending this byte array in to the file which is .jpg
    The .jpg file is getting created, but the data in it is very absurd, like yyyyyyyyyyyyyyyyyyyyyyyy.
    Please help me in this matter.
    Regards,
    Ashish

  • Font in a PNG

    hi!
    i'm currently developing a game in J2ME .... i wanted to use my own font, so i created a PNG file with all my characters. after, i wrote my "BitmapFont"-class
    here it is:
    * Created on 23.12.2004
    package sokodeluxe.util.bitmapfont;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import sokodeluxe.util.QuickList;
    * AbstractBitmapFont ist eine Vorlage f�r Klassen, welche Texte mit Buchstaben
    * aus einer Grafikdatei zeichnen k�nnen.
    * @author Manuel Alabor
    * @version 1.0
    public abstract class AbstractBitmapFont {
        /* Objekte: */
        private QuickList characters;
         * Standartkonstruktor
        public AbstractBitmapFont() {
            characters = new QuickList();
         * Muss von jeder BitmapFont-Klasse implementiert werden und dient dazu,
         * die entsprechende Grafikdatei mit den Zeichen zu laden und mit den
         * entsprechenden Zeichen zu verkn�pfen.
        public abstract void loadFont();
         * Schreibt/zeichnet einen String mit den geladenen Bitmap-Zeichen.
         * @param g
         * @param string
        public void drawString(Graphics g, String string, int x, int y) {
            char[] chars = string.toCharArray();
            int currentPos = x;
            for (int i = 0; i < chars.length; i++) {
                BitmapCharacter bitmapCharacter = getBitmapCharacter(chars);
    if(bitmapCharacter != null) {
    bitmapCharacter.drawChar(g, x, y);
    x += bitmapCharacter.getWidth()+1;
    * Gibt ein BitmapCharacter-Objekt aus der QuickList characters zur�ck.<br>
    * Wird das gew�nschte Zeichen nicht gefunden, wird null zur�ckgegeben.
    * @param character
    * @return
    private BitmapCharacter getBitmapCharacter(char character) {
    for (int i = 0; i < characters.size(); i++) {
    BitmapCharacter bitmapCharacter = (BitmapCharacter) characters.elementAt(i);
    if(bitmapCharacter.getChar() == character) {
    return bitmapCharacter;
    return null;
    * Schneidet aus einer FontMap einen Buchstaben aus und gibt diesen zur�ck.
    * @param fontMap
    * @param x
    * @param y
    * @param width
    * @param height
    * @return
    protected Image cutBitmapFont(Image fontMap, int x, int y, int width, int height) {
    Image target = Image.createImage(width, height);
    Graphics targetGraphics = target.getGraphics();
    // targetGraphics.drawImage(fontMap, x, y, 0);
    targetGraphics.setClip(x,y, width, height);
    targetGraphics.drawImage(fontMap,0,0,0);
    return target;
    protected void addBitmapCharacter(Image bitmapCharacter, char textCharacter, int width) {
    characters.add(new BitmapCharacter(bitmapCharacter, textCharacter, width));
    * Diese Klasse wird als Datenstruktur f�r ein Bitmap-Zeichen verwendet.<br>
    * Sie verkn�pft ein Bild mit einem Charakter-Zeichen.
    * @author Manuel Alabor
    * @version 1.0
    protected class BitmapCharacter {
    /* Eigenschaften: */
    private Image bitmapChar;     // Bitmap-Zeichen
    private char textChar;          // Zeichen
    private int width;               // Zeichenbreite
    * Standartkonstruktor.
    * @param bitmapChar
    * @param textChar
    public BitmapCharacter(Image bitmapChar, char textChar, int width) {
    this.bitmapChar = bitmapChar;
    this.textChar = textChar;
    this.width = width;
    * Zeichnet dieses Bitmap-Zeichen.
    * @param g
    * @param x
    * @param y
    public void drawChar(Graphics g, int x, int y) {
    System.out.println(textChar);
    g.drawImage(bitmapChar, x,y, Graphics.TOP|Graphics.LEFT);
    public char getChar() {
    return textChar;
    public int getWidth() {
    return width;
    from this class, i extend the font-class, in example this one:
    * Created on 23.12.2004
    package sokodeluxe.util.bitmapfont;
    import java.io.IOException;
    import javax.microedition.lcdui.Image;
    * @author Manuel Alabor
    * @version 1.0
    public class NovaBitmapFont extends AbstractBitmapFont {
        public NovaBitmapFont() {
            super();
            loadFont();
        public void loadFont() {
            try {
                /* Datei mit Buchstaben laden: */
                Image imgFont = Image.createImage("/images/font_nova.png");
                // Grossbuchstaben:
                addBitmapCharacter(cutBitmapFont(imgFont, 0,0,   5,9), 'A', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 5,0,   5,9), 'B', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 10,0,  5,9), 'C', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 15,0,  5,9), 'D', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 20,0,  5,9), 'E', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 25,0,  5,9), 'F', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 30,0,  5,9), 'G', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 35,0,  5,9), 'H', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 40,0,  2,9), 'I', 2);
                addBitmapCharacter(cutBitmapFont(imgFont, 42,0,  5,9), 'J', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 47,0,  5,9), 'K', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 52,0,  5,9), 'L', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 57,0,  9,9), 'M',95);
                addBitmapCharacter(cutBitmapFont(imgFont, 66,0,  5,9), 'N', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 71,0,  5,9), 'O', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 76,0,  5,9), 'P', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 81,0,  5,9), 'Q', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 86,0,  5,9), 'R', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 91,0,  5,9), 'S', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 96,0,  5,9), 'T', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 103,0, 5,9), 'U', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 108,0, 5,9), 'V', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 113,0, 9,9), 'W', 9);
                addBitmapCharacter(cutBitmapFont(imgFont, 122,0, 5,9), 'X', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 127,0, 5,9), 'Y', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 132,0, 5,9), 'Z', 5);
                /* Kleinbuchstaben: */
                addBitmapCharacter(cutBitmapFont(imgFont, 0,9,   5,9), 'a', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 5,9,   5,9), 'b', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 10,9,  4,9), 'c', 4);
                addBitmapCharacter(cutBitmapFont(imgFont, 14,9,  5,9), 'd', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 19,9,  5,9), 'e', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 24,9,  3,9), 'f', 3);
                addBitmapCharacter(cutBitmapFont(imgFont, 27,9,  5,9), 'g', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 32,9,  5,9), 'h', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 37,9,  1,9), 'i', 1);
                addBitmapCharacter(cutBitmapFont(imgFont, 38,9,  3,9), 'j', 3);
                addBitmapCharacter(cutBitmapFont(imgFont, 41,9,  5,9), 'k', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 46,9,  1,9), 'l', 1);
                addBitmapCharacter(cutBitmapFont(imgFont, 47,9,  9,9), 'm', 9);
                addBitmapCharacter(cutBitmapFont(imgFont, 56,9,  5,9), 'n', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 61,9,  5,9), 'o', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 66,9,  5,9), 'p', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 71,9,  5,9), 'q', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 76,9,  5,9), 'r', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 81,9,  5,9), 's', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 86,9,  3,9), 't', 3);
                addBitmapCharacter(cutBitmapFont(imgFont, 89,9,  5,9), 'u', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 94,9,  5,9), 'v', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 99,9,  7,9), 'w', 7);
                addBitmapCharacter(cutBitmapFont(imgFont, 106,9, 5,9), 'x', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 111,9, 5,9), 'y', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 116,9, 5,9), 'z', 5);
                /* Zahlen & Spezialzeichen: */
                addBitmapCharacter(cutBitmapFont(imgFont, 0,18,  3,9), '1', 3);
                addBitmapCharacter(cutBitmapFont(imgFont, 3,18,  5,9), '2', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 8,18,  5,9), '3', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 13,18, 6,9), '4', 6);
                addBitmapCharacter(cutBitmapFont(imgFont, 19,18, 5,9), '5', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 24,18, 5,9), '6', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 29,18, 6,9), '7', 6);
                addBitmapCharacter(cutBitmapFont(imgFont, 35,18, 5,9), '8', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 40,18, 5,9), '9', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 45,18, 5,9), '0', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 50,18, 1,9), '!', 1);
                addBitmapCharacter(cutBitmapFont(imgFont, 51,18, 3,9), '"', 3);
                addBitmapCharacter(cutBitmapFont(imgFont, 54,18, 6,9), '#', 6);
                addBitmapCharacter(cutBitmapFont(imgFont, 60,18, 5,9), '$', 5);
                addBitmapCharacter(cutBitmapFont(imgFont, 65,18, 10,9), '%', 10);
                addBitmapCharacter(cutBitmapFont(imgFont, 75,18, 6,9), '&', 6);
                addBitmapCharacter(cutBitmapFont(imgFont, 81,18, 4,9), '/', 4);
                addBitmapCharacter(cutBitmapFont(imgFont, 85,18, 2,9), '(', 2);
                addBitmapCharacter(cutBitmapFont(imgFont, 87,18, 2,9), ')', 2);
                addBitmapCharacter(cutBitmapFont(imgFont, 89,18, 3,9), '=', 3);
                addBitmapCharacter(cutBitmapFont(imgFont, 92,18, 4,9), '?', 4);
                imgFont = null;
            } catch (IOException e) {
                e.printStackTrace();
    }then, i create an instance of NovaBitmapFont and call the drawString method...
    so far so good... there arent any runtime errors, but instead of the letters, i got only white boxes on my outputcanvas ....
    could anybody help me?
    thx a lot!! :)
    greetz
    manu

    Your problem seems to be here:
    targetGraphics.setClip(x,y, width, height);You are setting the clipping region outside of the actual image. The target image is one you created of size width*height. If you set the clipping region to x > width or y > height then nothing will appear on the picture. That line is completely unnecessary.
    But even like this, the moment you create the target image, you are creating a completely opaque image, so you are losing any transparency you might have had in your png. If you need to keep transparency you need to keep all the characters in the original image, and draw it with clipping regions directly onto the canvas.
    shmoove

  • Best Practice for Many Complex Elements In One PNG File

    I use Fireworks all the time, but I'm still embarrasingly ignorant on how to do some things property.
    For instance, when I do mockups of a new customers homepage, there may be many small or medium sized complex objects on the page.  By "objects" I mean like lots of modules advertising their different services, and each module has its own graphics, text, backgrounds, etc all with lots of different effects applied.
    Should all of these things reside in one large png file, or does Fireworks offer some way for me to create some of these as separate png files and just drop an "instance" of them into the main file?  I read something about adding files to the Common Library, but I will only need these files for one single customer so that may be overkill.
    Or do I even need to worry about separating them at all and should just continue having everything for a single customer in one big single png file?
    Please let me know if my question is not clear.

    In reading a bit further, it looks like a good option for me might be to just select everything that makes up a specific module and just "group" it. That way I can move it around and turn it off and on easier.
    So I'm thinking that unless theres something Im going to reusing more than once in a document (which in this case I'm not) then its fine to have everything all in one png?  And the only time I use the Common/Document Library is when i'm reusing things?
    I'm just trying to wrap my head around what all my options are in Fireworks, as so far my experience is limited to just dragging around rectangles and shapes and stuff on one single canvas to create website mockups.

  • What's the difference between PNG and JPG for exporting .idea files from the Adobe Ideas app?

    What's the difference between PNG and JPG for exporting .idea files from the Adobe Ideas app?
    What situations are better to export to to .PNG or .JPG?
    J

    iPad apps are designed specifically for the iPad and will not run on the iPhone or iPod Touch. iPhone/iPod apps will run on the iPad, but will only take up an iPhone sized portion of the iPad screen (though you get a 2x button which effectively doubles each pixel in both directions so may appear pixelated). There are also 'universal' apps (which have a '+' symbol against them in the store) which have processing in them to recognise the device that they are on and will tailor the display accordingly (so will make use of the iPad's larger screen).

  • Emulating HTTP POST for file upload with J2ME

    I have search through a lot of site and couldn't find the actual code. I try to emulate below html with J2ME.
    <form method="POST" enctype="multipart/form-data" action="Insert.asp">
    <td>File :</td><td>
    <input type="file" name="file" size="40"></td></tr>
    <td> </td><td>
    <input type="submit" value="Submit"></td></tr>
    </form>
    here is my code :
    HttpConnection c = null;
    InputStream is = null;
    OutputStream os = null;
    byte[] filecontent = file byte content ...
    try {
    c = (HttpConnection)Connector.open("http://xx.com/insert.asp");
    c.setRequestMethod(HttpConnection.POST);
    c.setRequestProperty("Content-Length", String.valueOf(cmg.length + 15));
    c.setRequestProperty("Content-type","multipart/form-data");
    os = c.openOutputStream();
    os.write("file=c:\\abc.png".getBytes());
    os.write(filecontent);
    os.flush();
    I can emulate form with text field and it work, but when it come to file upload, above code not working, I don't know what to put for the outputstream, filename ? content ? or both ? since the html only has one field that is the "file" field. The file is actually store in rms with filename abc.png, and I just put in the c:\ for the server as a dump path.

    File upload is more complicated then that... you need multi-part MIME formatting.... But I have just the code...
    http://forum.java.sun.com/thread.jspa?forumID=256&threadID=451245

Maybe you are looking for

  • Mac Pro (Early 2008) and HP LP3065 30" display compatibility issue

    Hello! Is there FIX / Workaround to Mac Pro (Early 2008) and HP LP3065 30" display compatibility issue ? ( +w/ ATI Radeon HD 2600 XT display adapter+ ). Its really annoying problem :-/. Main problem is when i start my Mac, my 30" HP screen dosen't wa

  • Unable to start Essbase app when activating JVM in Essbase.cfg

    Hi, I am using Essbase 6.5.3, one of my application that uses a CDF won't start when activating the JVM in Essbase.cfg. Please help. Thanks.

  • Display  lines first 10 records field1 next 10 records field2

    HI   i have an issue in oracle reports. i need to display the first 10 records in field1  next 10 record  field2 please give me a idea my mail id is [email protected] Regards, Kamaraj

  • Product hierarchy V/76 - new level

    Hi, I want to create a new product hierarchy in V/76. I click on new entries and I can enter the product hierarchy and the description, but the "Level no." is greyes out so I cannot enter anything into that field. After saving every production hierar

  • Droplet doesn't open file...

    Hi, I have done a script that works well. I created a droplet from it, but when I drop a file on it, Photoshop launches BUT the image doesn't open... What could be the reason? Thanks for your help