×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    4

    Exclamation How to combine PNG images together in a row

    I have little png images that i want to combine together to create long png. Actually they are letters and I want to combined them to create a word as a one image. How can I do this in MIDP 2.1. Thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,567

    Re: How to combine PNG images together in a row

    http://www.developer.nokia.com/Commu...ing_in_Java_ME is what you could use. It creates uncompressed PNG, so be careful with the image size.

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: How to combine PNG images together in a row

    Given your need to create text strings out of images, read also: http://www.developer.nokia.com/Commu...nts_in_Java_ME

  4. #4
    Registered User
    Join Date
    Apr 2013
    Posts
    4

    Re: How to combine PNG images together in a row

    Thanks but i'm still confused. Which method I should call in PNGEncoder class to do somthing like that. Let's say combine two images together. can you or someone can give me an example?

    Thanks in advance!!

  5. #5
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to combine PNG images together in a row

    I think we need to clarify what you want to do.

    What do you mean by "combine them as one image"? And why do you want to do it?

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,567

    Re: How to combine PNG images together in a row

    The code is a PNG encoder, nothing more. The letters have to be collected into an image (or a byte array) manually.
    Something like
    Code:
    Image a=... // letter a, presumably loaded from file
    Image b=... // letter b, presumably loaded from file
    Image ab=Image.createImage(a.getWidth()+b.getWidth(),a.getHeight()); // empty image for ab
    Graphics g=ab.getGraphics();
    g.drawImage(a,0,0,Graphics.TOP|Graphics.LEFT); // draw a
    g.drawImage(b,a.getWidth(),0,Graphics.TOP|Graphics.LEFT); // draw b
    byte abPNG[]=PNGEncoder.toPNG(ab,false);

Similar Threads

  1. combine Symbian C++ and Qt
    By valmvadva in forum Symbian C++
    Replies: 1
    Last Post: 2011-05-05, 11:22
  2. How to combine the projects
    By ragu. in forum Symbian C++
    Replies: 3
    Last Post: 2010-08-14, 11:40
  3. combine bluetooth & sms
    By mabel90 in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2009-09-13, 17:06
  4. How To Combine Two Images?
    By coolblues5000 in forum Symbian Media (Closed)
    Replies: 26
    Last Post: 2008-10-29, 06:58
  5. How to combine two AT commands
    By conian in forum Symbian C++
    Replies: 3
    Last Post: 2008-08-17, 06:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •