problem with resize image

Hello

I want to resize the image when running according to the display width.

I try some code below, but it shows me the white screen.

class image extends screen
{
EncodedImage bit;
BMF BitmapField;
image()
{
try {}
                
BMF = new BitmapField (Bitmap.getBitmapResource ("next.png"));
bmf.setImage (bit.scaleImage32 (50,50));
Add (BMF);
}
catch (System.Exception e)
{}
            
           
}
}

Hey hardikkhamar,

Hey man, how do you think that this code is useful when dealing with the image url using http call?

Please Reffer to the code once more... its for the local image that is in your res folder...

you have loading.png image, right?

then get image coded this bitmap to aid

PNGEncodedImage encode = PNGEncodedImage.encode(Bitmap.getBitmapResource("loading.png"););

and then going on to encode this method with the width and height required... its that simple man...

Bitmap Resizedbitmap = setsizeImage(encode, 200,150);

Not to say thanks, Press the congratulations on the right side to thank the user who has helped you.
Please mark as resolved messages if you found a solution.

Tags: BlackBerry Developers

Similar Questions

  • problem with resizing and remove

    I have a problem with resizing images after loading, not all of the images has the scale ratio 0.75... so for the most part, I just stretch the images having the ratio...

    is there a good method of resizing/scalling? for example enjoyed.

    and once I've loaded images, I add in the imageContainer.

    I couldn't find a way, if I click on the next thumbnail, she remove the last child (image) of the imageContainer...

    I'm confuse ATM please point me in the right direction...

    Thank you

    Load the image clicked

    function mouseClickThumb (e: Event): void {}

    var thumb: thumbnail2 = e.target as thumbnail2;

    var linkName:String = e.currentTarget.name.toString (); get the name of the link

    var imageLoader:Loader = new Loader();

    var urlRequest:URLRequest = new URLRequest (linkName);

    imageLoader.load (urlRequest);

    imageLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded);

    function imageLoaded(e:Event):void {}

    var image: Bitmap = (e.target.content) Bitmap image;

    image.x = 0;

    image.y = 0;

    somehow if I resized the images here, it didn't turn right for all...

         }

    imageContainer.addChild (imageLoader);  / / How can I delete the last image? if click on the following icon?

    }

    If you want to remove the last (highest in the display list) child of a container, you can do this way:

    var numChild = imageContainer.numChildren ();

    imageContainer.removeChildAt (numChild - 1);

    don't forget display lists starts with 0, not 1, so you must always subtract 1 to get the level number of the child in the foreground

  • Problem with resizing table InDesign CS5

    I have problems with resizing of tables in InDesign CS5.

    The width can be entered and a decrease, but the right height do move up nor down when you pull in the lower right corner or anywhere else on the base of the columns.

    Does anyone else have this problem?

    Is it a bug or maybe just me not understanding things correctly in the help...?

    Any contribution is appreciated if you knock out. :-)

    Document corruption is sometimes disabled by exporting for Exchange. See remove minor corruption by exporting

  • Menu Spry, problems with background images in Internet Explorer

    Hello

    Looking for help from someone more qualified than me with some menus spry.  I have problems with background images don't show is not for some of my items menu in Internet Explorer.  Safari and firefox seem to accept it's ok.

    Here is a link to the menu: http://www.scottbrownwebdesign.com/beta/HTML/index.html

    and here is a link to the spry .css: http://www.scottbrownwebdesign.com/beta/HTML/SpryAssets/SpryMenuBarHorizontal.CSS

    I know that these are the elements that have the drop down or the side of the arrows.  I can't have two background images that I can?

    Thanks in advance,

    -Scott

    My first thought...

                         display: inline;          f\loat: left;          background: #FFF;
    
    Try declaring the background-image here as well... where it says not to mess with unless you know what you are doing.
    
    I'm just guessing though. If I had more time I'd look into it further but I do not.
    
  • Problem to resize images

    Photoshop Elements 8.0

    iMac OSX 10.8.3 32 GB memory

    (1) PE see only 2010 MB RAM

    I understand it is this exact PE, is - limit? Latest version of PE will support more RAM?

    (2) I can't resized images. It does not work: if I change 'with' or 'High', the 'resolution' is so changed. Save the image shows the image, as it was before you try to resize it.

    Also the 'Document size' does not show "pixels."

    I can't uncheck 'constrain proportions' (or other boxes).

    In general "resizing does not work.

    PE-8.jpg

    I used PE on my iMac previeus - no problem.

    I uninstalled and downloaded (EP 8) for my new iMac - but it doesn't (as explained).

    Any suggestion?

    1 no, all versions of PES are 32-bit applications and that's just how the 32-bit applications.

    2. If you want to change the pixel dimensions you must first activate the check-box resample. Even to constrain proportions, since neither of the two, to change the number of pixels in your image. It is generally a bad idea to try to transform an image by turning out to constrain the proportions. It will give you a distorted image, not a cropped. Use the crop tool to crop.

  • Problems with resizing and rotation vector! (CS5)

    I need help and can't find the answer to anywhere!

    My questions come from this fundamental task: drag files from Illustrator into Photoshop

    PROBLEM #1

    In CS3, when I dragged vector Illustrator files in Photoshop, it used to automatically resize the vector image to fit the canvas, I was working on. He is not doing this with CS5. Now when I drag files on since Illustrator, places it in the original format, I lose a lot of time having to zoom out, make it smaller and zoom back on my project. I did not 'Resize Image during up' selected in Photoshop, but it is not yet want to resize it! I went back to CS3 and he automatically returns the vector image, I tried to slip more into my project so that it forms!

    PROBLEM #2

    In CS3, when I turned a vector image (usually that I dragged Illustrator more), it would maintain the bounding box, but now in CS5 it doesn't! For example, I would normally make drag an Illustrator file into Photoshop, and then rotate the image as you wish. Then more later in the day if I wanted to rotate the image a little more or less, all I had to do was select the vector image and he would keep this rotated around him and told me that the image has been rotated currently 41 degrees. However, in CS5, when I rotate a vector image and then want to re-do rotate or resize, later in the day is not it. When I select the vector image, the bounding box is always a box or rectangle, with all the side dishes, and he tells me that the image is a 0 degree rotation (although earlier I have straightened out, say, 70 degrees). I'm not explaining this very well, but basically I can't resize or rotate more than once because he acts like she rasterizes the image, if it makes no sense.

    Bottom line, these are in HUGE trouble what I do!

    Help, please!

    wyzz7

    For what you are placing the image as a smart vector in object (also

    "It looks like you use Illustrator to clip a photo)?

    Why not do a vector mask in Photoshop and convert this layer hidden in

    a smart object?

    Other than that, as MTSTUNER pointed out, citing the transformation with

    command-T seems to work as expected and planned.

    The question of the pixel images placed being reduced, placed HERE - or pdf files

    do not be put on the scale seems indeed strange.

    If more people could reproduce it might be useful a bug report

    perhaps.

  • PROBLEM WITH "MY IMAGES".

    When you click on a photo, I right click to edit, a zoomed image in appears, about one-eighth of the original image. How can I reduce the zoom to show the complete image, also is ready for editing.

    Hi Pernboy,

    Thanks for choosing Microsoft Community Forums.

    According to the description, it seems that you are having problems with the retouching of images while zooming. I'll be happy to help you with this problem.

    (1) what application you use to change the images? (Viewer Windows or Microsoft Office Picture manager?

    In the meantime, I suggest you to press the Ctrl key and scroll the mouse down and check if it reduces the zoom to the desired level, if you change the pictures with zoom.

    I hope it helps. If you have any questions about Windows in the future, please let us know. We will be happy to help you.

  • Border problems with background image

    Hello

    I have a problem with my background image. I have fillings of browser size the original value and activated scale option in the middle. The image has a resolution of 1920x1080px. But when I now change the size of my browser I get a white border on the left or on the right size.


    Small to large size of Office Office:

    https://DL.dropboxusercontent.com/u/84237067/kleinzugross.PNG

    Large size of small office desktop:

    https://DL.dropboxusercontent.com/u/84237067/grosszuklein.PNG

    Hope you understand me, my English for this specific part is not perfect it.

    Greetings

    Marcel

    I checked out the site but don't see any white space on the page with large screens, I think that you have already solved the problem?

    Thank you

    Sanjit

  • Problems with resizing on mult-monitor Application Windows.

    We have a recurring problem with our deployment. We have seen 4.6, Windows 7 endpoints, and often when people are connected to the multi-display sessions, there will be a problem with the windows applications (outlook, acrobat, etc.) resizing. This only seems to happen after that the user opens its session (we have a policy of waiting period of 7 minutes, and people generally lock down their machines by leaving his office.

    To release their session, sometimes all the open windows app will decline in a smaller area, on the main monitor, and the user will have to bring back them to their original location. For example, if a user has two monitors, and they keep Outlook maximized on their left monitor (which is not their "main" screen), back into the machine, this Outlook window could move to the right screen and shrink to a small window.

    Anyone else see this issue? Now I can check only happens on PCoIP, don't know if it does on the RDP.

    Hello

    Yes, we met this in our facility. The idea that came with my boss and seemed to work, is to change power politics.

    We have created a new policy via Group Policy and forced the machines to use. There isn't that one change in this power management, be sure to set the monitors to never turn off in the virtual machine (the default value is 5 or 10 minutes). Since we deployed the change, no problems.

    If you run the client on Windows 7 machines can still have their monitors turn off, but as long as the monitors of virtual machines are always 'on' you should be fine.

    Give it a shot.

  • Problem with resizing fonts in the menu

    Hello, I'm almost done with my website, http://www.trolllord.com but I'm running into a problem with the font size in the menu.  At some point I must have accidentally set something wrong and need a new set of eyes on it.  When you hover over the menu items and sub-menu, the font size will more great.  This causes a few things up to two lines and is harsh on the eyes.  Can anyone help?  Here's my CSS for the menu:

    / * Clearfix * /.

    . Clearfix: before,

    . Clearfix: after {}

    content: "";

    Display: table;

    }

    . Clearfix: after {}

    Clear: both;

    }

    {.clearfix}

    * zoom: 1;

    }

    / * Basic styles * /.

    {of NAV

    Display: block;

    Width: 100%;

    min-height: 40px;

    height: auto;

    do-size: 0;

    do-family: ' PT without ', Arial, without serif.

    make-weight: bold;

    position: relative;

    margin: 0;

    color: #fff;

    background-color: #000000;

    text-align: center;

    }

    NAV ul {}

    padding: 0;

    margin: 0 auto;

    min-height: 40px;

    height: auto;

    }

    / * Only need to make a set of rules for nav li here * /.

    nav li {}

    text-align: center;

    / * This defines the inline-block elements, but also works in older versions of IE when fails inline-block * /.

    display: inline-block;

    Zoom: 1;

    * display: inline;

    vertical-align: top;

    position: relative;

    Width: 100px;

    line-height: 40px! important;

    height: 40px! important;

    do-size: 11pt;

    -webkit-box-sizing: border-box;

    -moz-box-sizing: border-box;

    box-sizing: border-box;

    }

    / * No need to reuse the float: left and display: block here - in fact it can spoil things later! */

    {li: hover NAV

    background-color: #993300;

    }

    / * Let's worry about the main nav first, then later, the subnav * /.

    NAV a {}

    color: #fff;

    / * All we need here is block since the li tags are inline-block for us * /.

    display: block;

    text-decoration: none;

    text-shadow: 1px 1px 0 #283744;

    }

    NAV a: hover, nav one: focus, nav a: active {}

    background-color: #993300;

    }

    / * An easier way to say that any link that comes after another link needs a left border * /.

    nav li + li {}

    border-left: 1px solid #576979;

    }

    {#pull}

    display: none;

    }

    NAV ul li {ul.submenu}

    min-width: 200px;

    display: none;

    position: absolute;

    z-index: 100;

    top: 40px;

    Left: 0;

    padding: 0;

    margin: 0;

    }

    NAV ul li: hover ul.submenu {}

    display: block;

    }

    .submenu li {}

    background-color: #455868;

    display: block;

    Width: 70%! important;

    }

    .submenu li a {}

    background-color: #456855;

    color: #fff;

    display: block;

    text-align: left;

    line-height: 20px;

    padding: 10px 25px;

    text-decoration: none;

    text-shadow: 1px 1px 0 #283744;

    border-right: none;

    border-bottom: 1px solid #576979;

    }

    .submenu a: hover, .submenu a: focus, .submenu a: active {}

    background-color: #993300;

    }

    / * Styles for screen 1000px and low * /.

    @media only screen and (max-width: 1000px) {}

    nav li {}

    do-size: 10pt;

    Width: 50%;

    }

    }

    / * Styles for screen 515px and low * /.

    @media only screen and (max-width: 515px) {}

    {#pull}

    Display: block! important;

    line-height: 40px! important;

    height: 40px! important;

    do-size: 11pt;

    background-color: #000000;

    Width: 100%;

    position: relative;

    }

    #pull: after {}

    content: "";

    Width: 30px;

    height: 30px;

    position: absolute;

    right: 15px;

    Top: 10px;

    background: url(file:///Macintosh%20HD/Users/redsoxburns/Desktop/wwwroot/images/nav-icon.png) no-repeat;

    }

    NAV ul {display: none ;}}

    nav li {}

    do-size: 11pt;

    Width: 50%;

    border-left: 0! important;

    border-bottom: 1px solid #576979;

    }

    nav li a {}

    line-height: 20px;

    padding: 10px 25px;

    }

    }

    / * Smartphone * /.

    @media only screen and (max-width: 320px) {}

    nav li {}

    Width: 100%;

    }

    {.submenu}

    min-width: 44px;

    Width: auto;

    right: 0;

    }

    }

    Thanks in advance for any thoughts... Tim

    Add the "BOLD"...

    NAV a: hover, nav one: focus, nav a: active {}

    background-color: #993300;

    do-family: ' PT without ', Arial, without serif.

    }

  • LoadMovie problem (with resizing)

    Hello. I am a student at the Flash and I have been exposed recently to
    the world of action script. My teacher at school is apparently not
    know much of action script and I need help quick because I need
    hand in my wallet of this coming Thursday morning.

    The problem with mine is that this static text button, I did and I'm trying
    to do than load the film, the SWF file, in a clip on a level 1.
    This, I was able to do, but the thing is in loading, the loading of the movie
    size is too large. So once loaded, the loaded movie is going off the stage...

    I used the action script was this:
    on (release) {}
    this.screen.createEmptyMovieClip ("canvas01", 1);
    this.screen.loadMovie ("ball.swf", canvas01);
    }

    The film loaded into the movieclip named "screen" alright
    but then the ball.swf retains its size as it has been saved
    and parts of it can't be displayed. Is there anyway
    You can resize the dimension of the movie loaded?

    Yes, you can resize a movieclip on a percentage scale dimensions using _xscale & _yscale is applied from the point of alignment of the movieclip. For example, I reduce the scale of the movieclip below 50% as well horizontally than vertically...

  • Problems with the image after the rotation of the

    Hello world

    I'm turning my .png image using the ImageManipulator library. Current rotation works fine, BUT - my image with alpha background is rendered on a gray square instead of alpha channel. What should I do with my image? How to preserve this alpha channel after rotation?

    OK, finally I managed to solve it. For those who are facing the same bugs with alpha channel by using ImageManipulator, you must change the method ' private Sub paintTransformedBitmap (Graphics g, int textureOriginX, int textureOriginY)

    private void paintTransformedBitmap(Graphics g, int textureOriginX, int textureOriginY) {
            // Make the drawing space transparent first before painting
            g.setGlobalAlpha(getBackgroundAlpha());
            g.setBackgroundColor(getBackgroundColor());
            g.clear();
            g.setGlobalAlpha(255);
            /**
             * Keep the precision of our transformation and Scale the drawing as
             * well. Scale is applied as though a matrix of the form
             *
             * 
             * | ScaleX  0     0|
             * | 0    ScaleY   0|
             * | 0       0     1|
             * 
    * is multiplied by the Transformation matrix * / dux int = Fixed32.div (transformMatrix [UX], resultantScaleX); DVX int = Fixed32.div (transformMatrix [VX], resultantScaleY); Duy int = Fixed32.div (transformMatrix [UY], resultantScaleX); dvy int = Fixed32.div (transformMatrix [VY], resultantScaleY); Necessary for alpha changes with Graphics.Clear 6.0 / / g.setColor (Graphics.WHITE); g.drawFilledPath (bitmapXPts, bitmapYPts, null, null); g.drawTexturedPath (bitmapXPts, bitmapYPts, null, null, textureOriginX, textureOriginY, dux, dvx, duy, dvy, bitmap); }

    Notice the end of the method - setColor and drawFilledPath now commented and image appears.

  • problem with scanning/image area for hp photosmart 2610 WIN XP

    Well well probably XP is half the problem since it is no longer supported... But I am havig problems scanning anything on my hp photosmart 2610. Area of the image go up and keeps telling me to insert my all in a disc and I evetually must use master to close the processes of HP. I tried everything to have HP on the phone (for 4 hours) and they could not uninstall and reinstall new drivers so not that I have two monitors of image digital hp running. Printing is not a problem but pulling to the top of photos and attempt at analysis of the new photos just do not work. I have the original disc of photosmart hp, but when I put it in my dvd player I get a message to put in an all in one disc I did not. I even downloaded the latest driver from HP and tried running that, but it does not say that it is alread installed... Should I just delete anything that has to do with my printet hp and then run the installation of new I removed the HP site? It makes me very nervous because I can print at least currently... If I delete everything and the installation fails, I can't live with printing capabilities. However, I want to be able to scan your photos of family, etc...

    Thanks for the help

    Robert

    Cheetah12

    Thank you for the information, he worked with a few minor changes since my system was a mess. But I would never have solved the problem without help...

    Great job

    Bob

  • Problem with background Images and scrolling

    I had to face for a while to get background pictures are working properly. Here's what I do:

    VFM VerticalFieldManager = new VerticalFieldManager();

    Card of bitmap = Bitmap.getBitmapResource ("MyImage.jpg");

    Background bg = BackgroundFactory.createBitmapBackground (map);

    vfm.setBackground (bg);

    This works, but has entrapment. First of all, he painted only as much as you have fields too much room, so I have to add empty fields just to occupy vertical space. However, on a page with something like a listField, where the height is variable, this can lead to what the background image are starting to repeat and to allow scrolling.

    What I want to do is to block all the scrolling and have the training exactly fill the screen with no scrolling or white empty places.

    I'll just on this wrong? Would really love to help...

    Hello

    Hope this will help you.

    class LoginScreen extends MainScreen {    //Manager        private VerticalFieldManager _manager;
    
        LoginScreen() {        //Set Background image            _manager = (VerticalFieldManager)getMainManager();            Background bg = BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("back.png"));            _manager.setBackground(bg);
    
       }}
    

    Add this manageron your screen don't add any component in this handler.

    You add fields in the Manager of the other, and adds that the Manager on the screen.

    Let me know if this solves your problem or not.

  • Problem with the images of the opening of the Laibrary mode in lrm?

    When I try to open a picture from the library feature and click on the image, load logo lights up and it will take a few seconds for the image to appear.  What can I do for the image to appear instanetaneously without taking a few seconds to loaod.  Back, this has something to do with preview (standard) rendering?  If I hit the preview made under library function and then click rendering all standard previews will be the correct loading image problem. Note that I 52,00 images in my catalog. I tested it this morning and a few images will be open without loading and others will be open upwards and take 5 seconds or more. Whats tdhe solution?  Thank you!!

    The problem is in the library in the grid view module when I open a single image, some of them will load instantly and others will take several seconds to load up to 4 to 6 seconds or more. The develop module works very well. The sliders etc work ok. Thank you!

    It would have already been said above, but this is usually caused by the right size preview is only not available for images or preview being obsolete. In this case, Lightroom must return from the raw file image and who will have a few seconds, especially older hardware. You must also make sure that your standard preview size is large enough for the screen that you use. It is set in the catalog settings-> files management. In Lightroom 5, you must make sure that the standard preview size is greater than the longest dimension of your screen. In Lightroom 6/2015, the trick is to set the size of 'Auto '.

Maybe you are looking for

  • iTunes Ripping from CD to NAS

    Hi there, apologies as I'm sure this has been answered in some form several times but I can't find too specific a question (s). I have a MacBook (OSX) and a DLINK NAS talk to one another. I would like to ship ripping my CD collection, so I have digit

  • HELP: do pls Win2k drivers for my Toshiba RL/cards

    I have a Portege A100 and Windows 2000 is installed. I used the Toshiba driver CD to install all my drivers. Everything seems to work except my drivers & RL. They install fine without error, but my LAN/WAN device appears as unknown in Device Manager.

  • HP Pavilion Slimline: upgrade to Windows 10

    I am wanting to upgrade to Windows 10 but didn't because I have Windows Media Center PC. Site Windows said I'd lose this because Windows 10 does not have that. He said that my Media Center will be deleted.  He then said I have to go buy a DVD player.

  • Adobe Reader displays on all the icons on your laptop.

    My son opened something in reader & he pushed his laptop. Each icon on his computer now shows adobe. How can I get the icons back? I uninstalled and reinstalled adobe, but it is still giving me the Adobe icon. I ran ccleaner & tdskiller to check the

  • Intel Management Engine Interface problem

    This device cannot start. (Code 10) STATUS_DEVICE_POWER_FAILURE Have installed intel latest driver for this on my Dell 8700 and it is always marked as non-operational in the Device Manager.