×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Aug 2013
    Posts
    37

    I need some tutorials..

    I need some tutorials on Image.getRGB() method of j2me.. I want to know how to design a image as i wish using this method.. Designing like resizing, adding colour, rotating etc etc.. I know that rotating can be done with other method or by using directGraphics but i want to know how to do that with getRGB() method.. Please provide me the link to so that i can get quite a good information in getRGB and design some by getting the logics.

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    678

    Re: I need some tutorials..

    RGB array that is returned to you from Image.getRGB() method is a simple 2d in 1d array that represent each pixel color data.
    So lets say you have a 3x3 pixels image
    so (when looking at the pixels as x,y position)
    rgb[0] is the 1,1 pixel color
    rgb[1] is the 2,1 pixel color
    rgb[2] is the 3,1 pixel color
    rgb[3] is the 1,2 pixel color
    rgb[4] is the 2,2 pixel color
    rgb[5] is the 3,2 pixel color
    rgb[6] is the 1,3 pixel color
    rgb[7] is the 2,3 pixel color
    rgb[8] is the 3,3 pixel color

    So if you change any of the pixels/array int value you are changing its ARGB color (A = Alpha/Transparency)
    As for resize, the midp API doesnt offer any method to scale an image but you can always write your own method to do that, if you want a ready made function that does this look at my article
    http://developer.nokia.com/Community...lor_picker_app
    you will find a function there with the following signature "public Image resize(Image img, int a, int b)"
    which mean it takes as parameters an Image and the desired new width and height and return such an image.
    As for the Rotating the API does allow you to rotate (only in multiply of 90 degrees angle) when drawing an image (you have to convert the rgb array back to image for that support) if you want to rotate in any degree that also can be done by writing your own code or looking for a ready made function, and i leave that part for you.

  3. #3
    Registered User
    Join Date
    Aug 2013
    Posts
    37

    Re: I need some tutorials..

    Thank you very much.. I really want you for that part that you told rgb is a double dimensional array.. It solved two of my problems.. Well i would try on my own for the image resizing but the link you have helped me a lot.. And also thanks the giving description of the rgb positions and the (x,y) involved in a particular position.. Thank you for all that you gave me..

  4. #4
    Registered User
    Join Date
    Aug 2013
    Posts
    37

    Re: I need some tutorials..

    Bro very very thanks.. I did all those programs like rotating 90, 180, 270.. Even i was able to do mirror as well as reflection.. I am very happy.. Thank you..

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    678

    Re: I need some tutorials..

    Hi Subha,
    your most welcome.
    feel free to also let us know when your app is complete and on the Nokia store so we may see the final result.

  6. #6
    Registered User
    Join Date
    Aug 2013
    Posts
    37

    Re: I need some tutorials..

    Bro do i have the permission to upload my apps to nokia store.

  7. #7
    Regular Contributor
    Join Date
    Dec 2012
    Location
    India
    Posts
    271

    Re: I need some tutorials..

    If you have a Nokia Account, you can always publish any number of apps to the store.

    See here for details : https://developer.nokia.com/Distribu...idelines.xhtml

  8. #8
    Registered User
    Join Date
    Aug 2013
    Posts
    37

    Re: I need some tutorials..

    But i have to provide the signed version of it.. So how will i sign.. I dont have certificates

  9. #9
    Regular Contributor
    Join Date
    Dec 2012
    Location
    India
    Posts
    271

    Re: I need some tutorials..

    You need not sign the application.Submit the app to the store and Nokia does free signing for you.

Similar Threads

  1. Replies: 1
    Last Post: 2012-08-10, 06:53
  2. Tutorials
    By williamzanelli in forum Mobile Java General
    Replies: 3
    Last Post: 2009-06-22, 22:47
  3. svg tutorials...
    By cutenik73 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2008-09-15, 10:59

Posting Permissions

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