User Tag List

Results 1 to 5 of 5

Thread: Help for development

  1. #1
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,248
    Mentioned
    177 Post(s)
    Tagged
    3 Thread(s)

    Help for development

    Hi James,

    I need your help in this.

    I need to convert CImage to Bitmap but i can not get the raw pixels as it is done in windows.

    is this possible in android.

    please can you post a small snippet to do this.


    Thanks in advance
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure how you are using the image, but this will grab an image off an sd card and create a bitmap from it:

    Code:
    Bitmap bmp = BitmapFactory.decodeStream(getContentResolver().openInputStream(uri));
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  3. #3
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,248
    Mentioned
    177 Post(s)
    Tagged
    3 Thread(s)
    Thanks Stephen for your answer!

    i used your method before but the one i want is the ones that comes from the CImage Banks internally saved during editime.

    the step to allocate them is done in creation object and obtain nImages from the editstructure.

    CImage cImage = ho.getImageBank().getImageFromHandle(nImages[i]);

    so here is a Cimage, internally have raw data, hotspot, size and i think the anti-aliased and other flags.

    so i need is to get the rawpixels from the image and decode to build the bitmap, i know that James "alloc" natively this data but i need to get the rawpixels as i do for the width, height and the hotspots.

    image = Bitmap.createBitmap(cImage.getWidth(), cImage.getHeight(), Bitmap.Config.ARGB_8888);

    // waiting here to obtain the raw image to convert it to bitmap
    image.setPixels(here should be a Bytes[], 0, cImage.getWidth(), 0, 0, cImage.getWidth(), cImage.getHeight());

    and that image should be a bitmap.

    I hope you can help me in this.

    Thanks in advance
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi Fernando

    Sorry, this isn't currently possible. I can add it in a future update though.

  5. #5
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,248
    Mentioned
    177 Post(s)
    Tagged
    3 Thread(s)
    Thanks James.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

Similar Threads

  1. Development kit installation ?
    By Solgryn in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 15th July 2011, 08:55 PM
  2. Extension Development
    By MattEsch in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 20th May 2011, 06:29 PM
  3. C# Extension Development
    By Jaffob in forum Extension Development
    Replies: 21
    Last Post: 3rd June 2008, 09:44 PM

Posting Permissions

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