Can I scale to bitmap or bitmapField?

Image bitmap bitmap = Bitmap.getBitmapResource (fileName);
BitmapField bitmapField = new BitmapField (bitmap, BitmapField.FIELD_HCENTER);

I have Bittmap and I need scale it... can you hel me please?

You can find a lot of discussion about it by typing 'ladder' in the search box, give it a try.
first train: http://supportforums.blackberry.com/t5/Java-Development/Rotate-and-scale-bitmaps/ta-p/492524

Also, check the int http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/EncodedImage.html#scale... )

Tags: BlackBerry Developers

Similar Questions

  • can we save the bitmap to persistent store?

    City previous forums:

    Smiley

    Messages: 29
    From: Canada
    Join date: May 2008

    can we save the bitmap to persistent store?
    Posted the: July 14, 2008 12:41
    Response
    I am trying to save a bitmap in Bank persistence and get an error msg saying Bitmap is not persistent.

    is it possible to save a bitmap?

    Thank you

    Yes it is possible.  You can use the Bitmap.getARGB method to get an array of bytes of the Bitmap image.  Then store its contents in a ByteVector.

    I am aware of the problem and would use a solution like that set up by MiuTunes.  Basically, generating thumbnails on the front and store them on the SD card.

    As neil says, there is a small performance lag, compared, but I find personally unacceptable in this application.  Don't know what you develop, and perhaps there are moments where in memory is better.  I'm also assuming (wrongly?) that you were going to leave them in the persistent store after your application ends.  Anyway, Neil knows more about what I do.

  • Can't scale bitmap smooth down

    smooth.JPG

    Hello

    I work on the text deforming and here's some of my code

    var shape: Shape = new Shape();

    shape.graphics.beginBitmapFill (bitmap.bitmapData.clone (), true, false, null);

    As you can see I put 'true' in the 'smooth' setting and this runs bi-lineaire interpolation when the bitmap stretches.

    However, when a large bitmap is reduced, no interpolation is performed and result is not smooth (see the inserted picture)

    What should I do to create bitmap looking for gentle content?

    You just draw (n) version deformed mesh full size to a BitmapData, then used that BMD on the scale?

    I did not mesh distorted anything before you import, but if you can draw as vector data correctly in pixels (BMD) then you can scale this object converted using the matrix. A 2-step procedure is not ideal, but it is relatively expensive if you are not all images.

  • In the Flash IDE, how can I scale the contents of a symbol without their appearance throughout the FLA?

    In the Flash IDE, I would like to scale the content of a symbol and then conversely fits a all instances of the chronology of this symbol.

    We have animations that were created to double the size of the size of the intended end-use. Of course, we can reduce bodies to 50%, but this isn't what we want to do. And here's why.

    Our use case for these animations means assign some of the contents of the symbols for performance reasons bitmap data. If we simply reduce the instances, the bitmap content is always twice as large as necessary.

    Yes, just make the symbols that only contain a bitmap image.

    Another tip, your bitmap image is either going to be recorded in the middle or top left. If it's in the Middle, you can select, Panel convert 50%, convert to bitmap, transform Panel 200%. If it is registered in the upper left corner (not sure how this would happen!), it is best to use the properties panel to the half of the width/height, convert to bitmap, set a height double width.

    Either way, in the case where you didn't know that, in one of these fields of property you can do math. Do not sit there work on which half of something is mentally, or in what position of x, it would be if it was 1234 pixels to the right. You can go on the ground and add: "/ 2" for example and all width was, it's now half that. Similarly, for the x position, you can add "1234" after the existing x value, to move that many on the right.

  • Why I can't scale proportionally by using the slide bar?

    I know there are other ways to change the size of an image, I would use Edit > Transform > scale to scale proportionately. It doesn't seem to work for me, as you can see below in this video that I created with audio included. What I am doing wrong? I use Photoshop CC 2015.1 on a 8.1 Windows machine.

    Appreciate any help you can offer.

    Your title is confusing: "moving bar. Usually people refer only to a bar in the space bar and the shift key. Are you pressing the SPACEBAR or shift key? The space bar will give you the hand, while the SHIFT key will scale proportionally. If you use the SHIFT key, you may have to reset your preferences.

  • How can I clean the Bitmap Images imported

    Hi, I am using Flash 5. I have imported a .png image sequence and they look pretty rough and bitmap so I wanted to clean them.

    1. what I have to select each frame after import and adjust the settings of the bitmap for each image or I can doo this somewhere so it affects al images?

    2. I can't find the settings to clean up the bitmaps. I thought they would be in the Panel "Properties"?

    3. is it possible to set the pixelation or clean a .swf imported or is it better to clean the sequence before you save it as a .swf?

    Ideally, you should have images cleaned / correctly size / optimised before import you them into Flash.  Once they are in Flash, one thing that you can do that can help how the image appears, especially if manipulate you its size in Flash, is to set the image to allow smoothing.  This can be set using code or can be applied manually to the image in the library do a right-click, selecting Properties and by checking the option to allow smoothing.

  • Drop large graphic on the small page or box, it can auto scale down to fit?

    I have a 200 page book in PDF 8.5x11 pages they want to scale down to pages in the format 8.5x5x5.  I know it's not proportional, but is it possible, I am droping each PDF page on the pages of ID, it will automatically adjust downwards to adjust the width?  I guess I would need to start with a blank rectangle structure on every page.

    Im just trying to avoid having to place each size full page, scale down each of them individually and then to refocus, each page individually

    Altogether. Discover the "adjustment options" in help. Basically, if you

    can prepare a placeholder on a master page grahpic image and its

    mounting options, then with your loaded cursor, you can place your

    objects on live pages and they will break in the frame according to

    your mounting options. It's very fun...

    Ariel

  • You can color a tif bitmap in ID?

    I am rebuilding a Quark file in InDesign CS3. The file contains text placed as tif bitmap files foreign alphabet, and they color in the dialog box change in Quark.

    Of course when I place these text/image files in InDesign they appear in black and white. Is it possible to color them in InDesign?

    My solution is to open these in Phshp change in CMYK, choose all black with the magic wand, create the right color in the palette, then fill the black selected text with the color. In addition to being quite tedious, I'm afraid that the quality is not good. And each bullet point is a separate file!

    You can color the raster images in grayscale or black and white without transparency.

    Way the easiest is to simply drag the swatches you want to use the chart on the right.

    Bob

  • Can I convert a bitmap image to a jpeg file?

    I want to put formats bmp and jpeg pictures in an album.  Shutterfly and Snapfish handle jpeg.

    You can open the file with MSPaint (start-> Run-> mspaint) then the file-> ' Save as ' then select .jpg as save format.

    HTH,
    JW

  • How can I re size bitmap while keeping the original my png transparency?

    Greetings and regards other developers, a few quick details, I use the blackberry JDE 5.0 and Eclipse.  I am for programming multiple phones Storm2 and all models of the torch.  The display area is different between some of the phones of 480 x 360 to 800 x 480.

    I created a method of resizing of the images based on the ratio of aspect here.

    public static Bitmap AspectRatio(Bitmap bm)
          {
            int widthRatio = (int)(360 / bm.getWidth());
            int width = (int)(Utility.SCREEN_WIDTH / widthRatio);
            int heightRatio = (int)(480 / bm.getHeight());
            int height = (int)(Utility.SCREEN_HEIGHT / heightRatio);
            Bitmap temp = new Bitmap(width, height);
            bm.scaleInto(temp, Bitmap.FILTER_BILINEAR);
            return temp;
          }
    

    This method works very well until I have try with my transparent Bitmaps.

    The transparent part of the my bitmaps are black and im not sure how to keep transparent.

    Example below.

    Front

    After

    How to keep my opacity after stretching?

    Thanks in advance.

    Not your problem.  Try this code that works for me:

    http://supportforums.BlackBerry.com/T5/Java-development/resizing-transparent-bitmaps/Ta-p/703239

  • A swf file can't scale?

    Looking for help as soon as possible with a series of flash banners, customer is using "windows apps" which enlarges the banners flash, the size of the window and I need to put in some custom action script code that prevents this. Please help, I'm not great writing AS3. The background is a static image of the beach and I have points beating in and scale... Please advise! I found this, but it makes little sense to me:

    Prevent the scale and keep the position

    You just need to add a single line of CODE in your file.

    Go to the first timeline and open the Actions (F9)

    Paste the following code there and test movie:

    stage.scaleMode = "noScale";

  • scale objects (bitmaps)

    Hello

    I had this imported bitmap (png file) and putting in a mc.
    When I run the memoranda of agreement top id like to increase by 20% or something like that.

    {run}
    this.scaleX = 120;
    }

    Any tips?

    Eric

    Never mind :)

    {run}
    var myScale:Number = 120;
    This ._xscale = myScale;
    This ._yscale = myScale;
    }

    See you soon!

    Eric

  • Bitmap scaling problem

    I have a simple yet unusual problem... I can't scale a bitmap despite the use of scaleinto class. BTW, I use the BB Torch Simulator.

    My code is as follows:

    Create background bitmap

    Image bitmap bmpBkg = Bitmap.getBitmapResource ("sunlight2.png");

    Bitmap scaling

    Scaledbitmap bitmap =new Bitmap (Display.getWidth (),Display.getHeight ());

    bmpBkg.scaleInto (scaledbitmap, Bitmap.FILTER_BILINEAR);

    The problem is that even after the operation of scaleinto the height and width of the bmpBkg remain the same...?

    Can someone help me with this please?

    Thank you.

    According to me, Miss me something here:

    After:

    bmpBkg.scaleInto (scaledbitmap, Bitmap.FILTER_BILINEAR);

    isn't the Bitmap scaling in scaledbitmap rather than bmpBkg?

  • How to set the transparent color in the BitmapField?

    I display some Bitmap using BitmapField, to create a screen as our Office Windows means icons followed by the name of the application. When I first time poster main screen it seeks it is transparent, but when I move the focus from one Bitmap to another, bitmaps are not rest transparent. I want transparent bitmaps after moving the slider too. How can I do? Does anyone have an idea?

    Thanks in advance...

    No problem, I was not angry at all.  I wanted to just make sure I understood your problem before giving an answer.

  • Field bitmap button

    Hello...

    Yes, I looked in other posts.  And trying to disect the sample APP CustomButton.  But, the image does not change the focus for this, and really, I had a hard time to work with it.

    So, after several hours, I write...

    I would like to make my button below clickable so that it plays a sound image and changes on focus.  However, I have not yet found a strategy that I could implement.

    Can someone provide some guidance?  The error that I get with the implementation ŒUVRE FieldChangeListener when I try to extend the UiApplication is that...

    ....... The SmartCord type must implement the inherited abstract method FieldChangeListener.fieldChanged (field, int)

    So clearly something is wrong and I have a bad strategy, but I have no idea what.

    I use absolute available to resize the image according to the size of the screen

    Thanks for the tips...

    package com.package;
    
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    
    /**
     * This class extends the UiApplication class, providing a
     * graphical user interface.
     */
    
    public class MyApp extends UiApplication implements FieldChangeListener
    {
    
        public static void main(String[] args)
        {
                MyApp theApp = new MyApp();
                theApp.enterEventDispatcher();
        }
    
        public MyApp()
        {
            MainScreen mainScreen = new MainScreen();
            AbsoluteFieldManager MainFieldManager = new AbsoluteFieldManager(){
    
                //Size the Field to the Screen Size
    
                protected void sublayout( int maxWidth, int maxHeight)
                {
                int width = Display.getWidth();
                int height = Display.getHeight();
                super.sublayout( width, height);
                setExtent( width, height);
                     }
    
                //Override the paint method to draw the background image.
    
                public void paint(Graphics graphics)
                {
                    Bitmap background = Bitmap.getBitmapResource("background.png");
                    Bitmap backgroundscaled = new Bitmap(Display.getWidth(),Display.getHeight());
                    backgroundscaled = new Bitmap(Display.getWidth(),Display.getHeight());
                    background.scaleInto(backgroundscaled, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FILL);                                   
    
                    //Draw the background image and then call paint.
    
                    graphics.drawBitmap(0, 0, Display.getWidth(), Display.getHeight(), backgroundscaled, 0, 0);
                    super.paint(graphics);
                }
            };                        
    
            //Power Button 
    
            Bitmap powerbutton = Bitmap.getBitmapResource("blackbutton.png");
            Bitmap whitepowerbutton = Bitmap.getBitmapResource("whitebutton.png");
            Bitmap powerscaled = new Bitmap(Display.getWidth()/2,Display.getWidth()/2);
            powerscaled = new Bitmap(Display.getWidth()/2,Display.getWidth()/2);
            Bitmap powerpressedscaled = new Bitmap(Display.getWidth()/2,Display.getWidth()/2);
            powerpressedscaled = new Bitmap(Display.getWidth()/2,Display.getWidth()/2);
            powerbutton.scaleInto(powerscaled, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FILL);
            whitepowerbutton.scaleInto(powerpressedscaled, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FILL);
            BitmapField bitmapField2 = new BitmapField(powerscaled, Field.FOCUSABLE) ;
            //Location
            int field2x=Display.getWidth()/4;
            int field2y=(Display.getHeight()/2)-(Display.getWidth()/4);   
    
            //Add the manager to the screen.
    
            mainScreen.add(MainFieldManager);
    
            //Add the fields to the manager.
    
            MainFieldManager.add(bitmapField2,field2x,field2y);            
    
            //Push the screen.
    
            pushScreen(mainScreen);
        }
    }
    

    Thanks for the reply.

    Yes, I am just now simply show the domains I've created for the package which is currently running and which displays some things I'd like to that.

    So my queestion is, what do you suggest to be the next?  I feel that I need to have separate classes for each button, which extends to a BitmapField?  I left it because I didn't know how to add.

    Thank you

Maybe you are looking for