scaling of bitmap problems

Hi, I'm doing my compatible application on all phones, and I came to a roadblock.

-the sNormButton parameters are just an experiment to see if it works

-the normal parameters of the image are 40 x 20 cm I think

-everything works perfectly before putting in the code of scaling

-at the moment is to find a null pointer exception when I trigger the image

Here is my code on the screen:

Bitmap SNormButton = new Bitmap (10.5);

.......

public mainUIScreen()
{
Super();
......

If ((Display.GetWidth () == 320) & (Display.getHeight () == 240))
{
A.newGame.scaleInto (sNormButton, Bitmap.FILTER_BILINEAR);
}

.....

newGameBut = new BitmapButtonField (A.newGame, A.newGameUp);
newGameBut.setChangeListener (this);

I'm new to the thing scaled so all words of advice are greatly appreciated, thank you!

Is this for 5.0 and above?

If so, use this class for scaling: http://supportforums.blackberry.com/t5/Java-Development/Resizing-Transparent-Bitmaps/ta-p/703239 it is clean and works with images that have transparent backgrounds (which the BB SDK does not work).

Tags: BlackBerry Developers

Similar Questions

  • Scaling of Bitmaps embedded in Illustrator files.

    Hello

    At the moment, if I'm files provided with built-in Bitmaps (or related) I find the source file, rebuild the image and the parent to the rest of the work, if I want it intensify.

    I can't just step up in Illustrator which makes things too big for AE work with.

    Then

    I was wondering if there was a way to gain access to Illustrator, scaling in EI.

    For example, within a 1024 x 576 image, there is a small bitmap picture.

    In Illustrator, the original bitmap has been reduced to 12%

    I want to zoom in on that part of the image

    If I resized the picture upwards in artificial intelligence, he referred to the original bitmap, so I can resize it back up to 100%

    But if it's at 1024 x 576 AE can't do.

    Continuous dither treats the whole things as vector of original size.

    I can't do just one big file AS I would now have a px AI 10240 x 5760 file that would give me errors of memory.

    (because always the AE will not only rendered what is in the window, but must do the whole layer. Did someone nothing real now at Adobe?)

    Maybe some PDF files would work?

    Is focused on working on a workflow better

    designers still use bitmap (and bitmap effects!) images in artificial intelligence and think that I can zoom in on them.

    Even at 100% weird flickering errors occur with bitmaps in files so I have used to reuse and parents anyway.

    Nope. Would be nice, but can't be doen ATM. And a simple PDF file is useless, either because this can actually worse by flattening of the things that could be the vector into bitmap data or cut out pictures in separate tiles...

    Mylenium

  • MouseEvent.CLICK blocked by the child bitmap problem

    Hey guys.

    If anyone has experienced this problem or is sufficiently educated so that you can come up with a working solution then please post here.

    Good so for now I have 2 SWF files. A swf is the main swf, which contains a class called Avatar. This class extends Sprite and has 1 child, which is a bitmap image.

    What I do is load the child swf file into the main swf, create an object of the Avatar class and pass the Avatar object down to the child swf file.

    The child swf file takes this object and adds it to a Sprite object as one of its children. Then I add an event listener for MouseEvent.CLICK to Sprite (the one containing the Avatar sprite) object that is in the child swf file.

    Now when I click on the Avatar inside the Sprite image in the child swf file. Do not fire the mouse click event.


    If you can shed some light as to why this happens, I would be very grateful.

    Thank you.

    Difficult to say without seeing a code.

    As you describe it - it should work. How do you know that MOUSE_CLICK is not pulled?

    In addition, there are masks?

  • Flexographic distortion/scaling of the problems... Help!

    Hello.

    I'm having a problem with the end of printing InDesign (Cs3 Version 5.04).

    I'm trying to distort an document to flexographic printing purposes.

    Points in the mesh areas change causing the image to change/degrade.

    The selected areas are in the text is very sensitive because the outlines of the text become jagged points after "Scaling" distortion (Print > Setup > Options > scale > % > * unchecked limited proportions).

    Image degradation is only present in the film after doing this in InDesign. Quality is a fine print to a 100% constraint.

    This problem does not exist when I send the same image in a document Quark scaled down using there FlexScale extension.

    The document consists of an imported file Photoshop.TIFF of a certain type of projected grayscale, nothing crazy.

    All & all help will be greatly appreciated... ideas and theories are good as well...

    Out of curiosity, what kind of RIP/device are you printing to? I can't duplicate that with my printer which is, according to me, ignoring any prior information of InDesign and using its own. Are you print separations, composite, or in-RIP separations?

    Here is a possible workaround that may or may not prove acceptable to you. Export the pages in PDF format. Then place the PDF in a new InDesign document. The PDF file imported with your different X and Y scaling factors in the new document to the scale and print at 100 X 100%. Since you're using CS3 (and not an earlier version), you can also try placing the InDesign itself document in the new document and scale here (without the need for a PDF export). Either of those who avoid the problem?

  • Scaling background Bitmap, 9900 vs 9700

    App looks on the 9900, but of course, the 9700 has a different screen and my bitmaps were created to adapt to the 9900. I checked the other threads, but all they advise to make is to use the method. scaleInto(), who does not work for me, as shown:

    Bitmap bgfirstscreen = Bitmap.getBitmapResource("peerreview2.jpg");
                Bitmap bgfirstscreenScaled = new Bitmap(Display.getWidth(),Display.getHeight());
                bgfirstscreen.scaleInto(bgfirstscreenScaled, Bitmap.FILTER_LANCZOS);
                Background background = BackgroundFactory
                        .createBitmapBackground(bgfirstscreen);
    

    Is this all that generally must be done for the bitmap on the scale? It is used as a background image for my application screen.

    Hi vingilot

    Try this.

        public static Bitmap getScaledBitmapImage(String imagename,int wd,int ht)
        {
            EncodedImage image = EncodedImage.getEncodedImageResource(imagename);
            if(image.getWidth()==wd && image.getHeight()==ht)
                    return image.getBitmap();
            int currentWidthFixed32 = Fixed32.toFP(image.getWidth());
            int currentHeightFixed32 = Fixed32.toFP(image.getHeight());
            int width = wd;
            if(width == -1)
                width=image.getWidth();
            int height = ht;
            if(height == -1)
                height=image.getHeight();
            int requiredWidthFixed32 = Fixed32.toFP(width);
            int requiredHeightFixed32 = Fixed32.toFP(height);
            int scaleXFixed32 = Fixed32.div(currentWidthFixed32, requiredWidthFixed32);
            int scaleYFixed32 = Fixed32.div(currentHeightFixed32, requiredHeightFixed32);
            image = image.scaleImage32(scaleXFixed32, scaleYFixed32);
            return image.getBitmap();
        }
    

    Thank you

    Pawan

  • Scaling of Bitmaps on BB 4.6?

    Hi all

    Take a look at the following knowledge base article:

    Rotate and scale of bitmaps

    Works on BB4.2 and later versions.

  • scaling of bitmap

    HII all I want to change my image of transparent background 100 * 100 in 80 * 80 with transparent background.  When the

    bitmap. Scale (new bitmap (), Bitmap.lancoz);

    How to make transparent background as a black background...

    but I want not transparent as original image...

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

  • After Effects CS4 / Illustrator scaling of fonts problem

    I created a file Adobe Illlustrator consisting of three layers of text in three sizes of fonts, 1296, 72 and 6 points on a computer running WIndows Vista with CS4 (all updates) using the Impact font without mods.  Then I used it in After Effects to create a pixel annimation 1280/720 can evolve from the largest to the smallest font.  I have anti-aliasing more accurate film and NOMINAL value is not defined in the timeline panel.  As you can see from the example, it makes good to a point, then it starts to Pixelize. I reproduced the problem in several other scenarios.

    However, when I create the annimation even in After Effects, using the same Impact font, I get the smooth fonts from small to large, see below.  Obviously, I do something wrong, fade when I import the file in AE (I tried importing as images and vector Art), or I create the .ai incorrectly (just using default values).

    I have apprecriate your help!

    Select the level continuously rasterize switch.

    Mylenium

  • Flash animation scaling of the problem while integrating

    First of all, I am completely new to Flash build if it said.

    I paid for a script of cat flash called deluxe, flash chat, now called camcomchat, anyway I lost the original updated download only text based only and had to ask the guy to a re download. Long story short, he ended up giving me the latest version.

    The question I have now is that the old version, I had would scale according to the embed code and it does not work.  This script is beyond useless if I can't get it across, the example below in the screenshots for. (note aside the guy discredited the $ 500 from me for any advice on that)

    Overview of old version in full screen:

    Chat.jpg

    New preview version in full screen:

    Chat2.jpg

    If I compile the new version under flash 9 it becomes able scale but it creates a video loop, but if I remove the code complained and managed to compile without error the way it is above the display returns.

    Any advice would be great!

    You have access to the FLA, or just a published SWF file? If you have the FLA, you might have to insert one of these lines of code at the beginning of this one:

    ActionScript 2:

    fscommand ("allowscale", true);

    ActionScript 3:

    stage.scaleMode = StageScaleMode.SHOW_ALL;

  • Question about image scaling height

    Hi all

    I know that there are a ton of posts on this topic, but I have not really found one that is clear on the problem I encounter.

    Basically I have a PNG image that I want to change so that the width of the image corresponds to the width of the screen.  So, I want the height of the image to be adjusted automatically in order to preserve the proportions of the image.  Currently, I am doing this:

    Bitmap b = Bitmap.getBitmapResource(image);
    
    Bitmap scaled = new Bitmap(Display.getWidth(), ???);
    b.scaleInto(scaled, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FIT);
    
    BitmapField bf = new BitmapField(scaled);
    

    But with this method, I have to set the height of the sized image.  This is not good, as I don't know what should be the height after the image has been resized (and kept proportions).

    Anyone know how I can determine the correct height of the image?

    Thank you.

    If you can get the height and width of the image, then use the ratios.

    UX = initial width, OH is original height, NW is the new width, NH = new height.

    (NW * OH) / OW = NH

  • Problems of brightness Hotkey on 64 bit nvidia 195.62 w700

    Hello

    After the installation of Nvidia drivers 195.62 indicator brightness via keyboard shortcut does work more (Fn + home), only to work on her. Is anyone know to correct errors. I tried in the registry and configuration setting, but does not help. I installed a 2.23.0000 keyboard shortcut version. In addition, these drivers 195.62 difficulty graphical scaling of the problem in DirectX 10.


  • CC of Photoshop / Windows 8.1 HiDPI / retina support scaling

    Hi, I am running the latest CC applications on a Windows 7 machine and I am currently looking to upgrade my PC hardware, I've got my eye on the new Dell XPS15 with Haswell CPU/HiDPI screen (resolution of 3200 x 1800) or equivalent new Dell Precision m3800 where available in November with identical specifications.  After testing a systems of Windows 8/8.1 number over the last few days with Photoshop CC (14.1.2) it seems that Adobe still has not yet implemented the retina style user interface scaled for either of its CC applications for the Windows platform. They seem to all defaults to a predefined pixel font size. Potentially make Photoshop and other unusable apps on a laptop screen 3200 x 1800 15.6 "if they do not evolve as their Mac counterparts.  Can someone confirm or clarify if this feature for Adobe on Windows products still exist, though she will never be or when it will be available in the near future?  Thank you

    Yet once again, we continue to work with Microsoft on the scaling of the problems in Windows.

    We and they recognise that the existing attempts to offer scalable UI have serious problems.

    And no, we cannot commit to a timetable for a long list of reasons.

  • the scale of a bitmap

    I'm scaling a bitmap image and the great works, the thing is that when one tries to show by using the function sprite.graphics.beginBitmapFill (bitmapdata, null, false, false) market not work, what and do is the following.

    bitmap.scaleX = value;

    bitmap.scaleY = value;

    It works perfectly

    var container: Sprite = new Sprite();

    container.addChild (bitmap)

    work in this way does not work

    var container: Sprite = new Sprite();

    container.graphics.beginBitmapFill (bitmap.bitmapdata, null, false, false);

    Anyone know why in the second case, the bitmap dosen't appear to be to scale;

    The bitmapData does not change when scaling, only its rendering on the screen.

  • Look at pictures of press pdf low resolution

    Hey,.

    I wrote a pdf of press of an Indesign file made up of photography. He was wonderful as usual. But I imported the same content for a resizing and wrote a new pdf press and photo of the pdf part looks like very low resolution. I re-imported the photos and tried again. But now I am at a loss. Someone help please?

    As you find it, a lot depends on how you create the PDF file. I guess it isn't with the option to export in ID, Acrobat. When you change the size on a bitmap, a change of resolution in PDF format can cause a lot of problems because of the way the original bitmap can be sampled and put in the new resolution. Always a danger when playing with scaling of bitmaps (why vector graphics are preferred where appropriate - of course, not for photos and others). I suspect that all goes back to the sample which is forced. In the future, you might want to to scale the chart in an appropriate program (perhaps PhotoShop) to obtain the desired size and resolution and use in the presentation of the ID, not just a copy, paste, scale. Graphics programs are properly designed scaling a bitmap.

  • These last questions w/eBay font size. Fonts page summary now too small to read.

    eBay policies is always displayed correctly using IE. BUT little by little, eBay police changed the size of font within a given page of eBay. 'My eBay' a 10 drop-down selections. These 5 are OK: offers/offers, Watch List, purchase history, my Collections, Messages. These 5 police being so small almost invisible: summary, wish list, all the lists, sales, followed by research. If all goes well, a fellow eBayer is to see these changes too.

    I'm guessing that eBay programmers have been tweaking Internet Explorer to correctly display the fonts on all pages, as Internet Explorer has had its own problems of font size of eBay in the past. But now using Internet Explorer looks good! However, at the same time, Firefox has really gone South. My guess is the tweaking of the IE has destroyed now possibility of FireFox to display the font correctly sizes in eBay. Ask me questions if you see what I see. I can send some screenshots. Thank you, Tom Smiley

    Two other thoughts:

    (1) Firefox allows you to select a font size minimum for all pages. It can destroy a large number of provisions, so usually it not very useful, but if the fonts are unreasonably tiny, you can try it.

    "3-bar" menu button (or tools) > Options > content > button "Advanced".

    The top of the page, set "fonts for: Western ' and then about halfway to the bottom of the dialog box, change the Minimum font size to 9.

    At the top, the value ' fonts for other languages: ' and repeat the process. And then click OK.

    Which enlarges the tiny fonts?

    (2) there are scaling of the problems with the new screens of more-than-the-full-HD, especially when the site uses the Flash plugin. If you have such a screen, you may lodge a complaint with the site, so they can update their Flash media.

Maybe you are looking for

  • Skype takes FOREVER to install

    Was trying to update my Skype and now I got the ' a moment, we will improve your Skype experience for a long time.» I restarted my computer a couple of times, that nothing has changed. Help, please!

  • SpeedFan Lenovo G50

    Hello world I wanted to control the speed of the fans speedfan or some piece of software. I tried different programs but none of them detects fans. Any idea? See you soon!

  • Parallel Port problem

    We used the kind of software that uses a key lock (which is connected to the parallel port), we have added new machines in our Mt. HP3330 company, i.e, who doesn't have a parallel port on the motherboard. The problem starts here, even after installin

  • My cat stepped on my keyboard and the monitor on the side reoirented. How should I do?

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas: My cat stepped on my keyboard and reoriented the monitor on the side.  What key press sequence to fix it? You have problems with programs

  • Vista SP1 installation failed and now my system is unable to start.

    I tried to install the Vista Service Pack 1 (SP1) and it stalled for hours with this line of text on the screen nflickering: !! 0xc01a001d! 28461/88529 (\Registry\Machine\COMPONENTS\DerivedData...) I have a Toshiba satellite laptop computer with Vist