Image of background using different resolutions

In my application, I have to use images of background and the image gallery.

App has support for different deveices of BB (with different resolutions)

can I use a single image and up and down the ladder? (please let me knpw the class thing to do)

If it's going to be a good standard resolution of an image?

(images get a webservice)

Thank you

You can use the EncodedImage classes and class Fixed32 to load and scale of the bitmaps on the fly in your code. I would load the largest resolution you want to take over or slightly larger (480 x 360 is what I use) and scale upwards or downwards according to the needs. Here is an example of code that I use:

int ratiow = Fixed32.div( Fixed32.toFP(ImageWidth) ,                          Fixed32.toFP(WidthToFitIn) );
int ratioh = Fixed32.div( Fixed32.toFP(ImageHieght) ,                           Fixed32.toFP(HeightToFitIn) );

Bitmap background =        EncodedImage.getEncodedImageResource("images/background.png")                               .scaleImage32(ratiow,ratioh).getBitmap();

Tags: BlackBerry Developers

Similar Questions

  • Problem with background at different resolutions [was: help dreamweaver CC!]

    I am new to Web design, I tried to make my own web page using sensitive design (bootstrap, css, etc.), the site is already the case for a large number of resolutions and it works fine in the preview of the browsers, but say for example I see the iPad website with a resolution of 1024 x 768 , the site is displayed correctly, but if I scroll down on the sides, I can see the rest of the background, and as you know is not very elegant... So what can I do to allow users to see everything they need to see? I tried to give the background of different sizes in different resolutions, but it worked because when I arrived at higher resolutions the CSS queries, I created in lower resolutions are not stayed I left their... Can anyone give me a tip?

    [Edited by moderator subject line]

    Try to change the width of the images in the percentages as in

  • Providing of different resolution images to fit different screen sizes

    You use RoboHelp 11, if anyone can describe the best approach to provide the same image with different resolutions, to adapt to different screen sizes? I think that this can be done by changing the CSS to recognize the screen resolution and transfer the image of suitable size. Any advice would be appreciated. Thank you

    Lol that is the same picture that gets resized on the fly. Open the sample and

    generate reactive power. There is a picture in the retirement section. Go

    to this and keep the window resizing.

    As long as the original is good enough for a full browser window,

    all you need to worry.

  • How to batch, fusion of the 3 different images? I use molten and the total of 240 different images.

    How to batch, fusion of the 3 different images? I use molten and the total of 240 different images.
    is there any script for it?

    like photoshop, batch processing is unable to identify 3 different images and merge these three images. Instead, it performs the action on a single image.

    Thank you

    under the direction

    // 2015, use it at your own risk;
    #target photoshop
    var theFolder = Folder.selectDialog ("select folder");
    if (theFolder) {
    ////////////////////////////////////
    var theFolders = theFolder.getFiles(getFolders);
    for (var a = 0; a < theFolders.length; a++) {
    var theFiles = Folder(theFolders[a]).getFiles(/\.(jpg|tif|eps|psd)$/i);
    ////////////////////////////////////
    // open first image;
    theFile = app.open(theFiles[0]);
    var basename = theFile.name.match(/(.*)\.[^\.]+$/)[1];
    // place other files;
    for (var m = 1; m < theFiles.length; m++) {
    placeScaleRotateFile (theFiles[m], 0, 0, 100, 100, 0, false);
    // set to screen;
    theFile.activeLayer.blendMode = BlendMode.SCREEN
    };
    // save as psd;
    psdOpts = new PhotoshopSaveOptions();
    psdOpts.embedColorProfile = true;
    psdOpts.alphaChannels = true;
    psdOpts.layers = true;
    psdOpts.spotColors = true;
    theFile.saveAs((new File(theFolder+'/'+basename+".psd")),psdOpts,false);
    };
    };
    ////////////////////////////////////
    ////// place //////
    function placeScaleRotateFile (file, xOffset, yOffset, theXScale, theYScale, theAngle, linked) {
    // =======================================================
    var idPlc = charIDToTypeID( "Plc " );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        desc5.putPath( idnull, new File( file ) );
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc5.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc6 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc6.putUnitDouble( idHrzn, idPxl, xOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc6.putUnitDouble( idVrtc, idPxl, yOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc5.putObject( idOfst, idOfst, desc6 );
        var idWdth = charIDToTypeID( "Wdth" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc5.putUnitDouble( idWdth, idPrc, theYScale );
        var idHght = charIDToTypeID( "Hght" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc5.putUnitDouble( idHght, idPrc, theXScale );
        var idAngl = charIDToTypeID( "Angl" );
        var idAng = charIDToTypeID( "#Ang" );
        desc5.putUnitDouble( idAngl, idAng,theAngle );
    if (linked == true) {
        var idLnkd = charIDToTypeID( "Lnkd" );
        desc5.putBoolean( idLnkd, true );
      };
    executeAction( idPlc, desc5, DialogModes.NO );
    // get layerid;
    var ref = new ActionReference();
    ref.putProperty (stringIDToTypeID ("property"), stringIDToTypeID ("layerID"));
    ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var layerDesc = executeActionGet(ref);
    var layerID = layerDesc.getInteger (stringIDToTypeID ("layerID"));
    // =======================================================
    return [app.activeDocument.activeLayer, layerID];
    };
    ////// get folders //////
    function getFolders (theObj) {
    if (theObj.constructor == Folder) {return true}
    };
    
  • How will I know if my edge compositions animate will scale upwards or downwards to adjust the resolution of each mobile phone platform? iPhone 3s, 4, 4, 5 and 5 have all different resolutions. Can I use PNG or svg?

    I want to use Edge animate to create native application in PhoneGap Build. How will I know if my edge compositions animate will scale upwards or downwards to adjust the resolution of each mobile phone platform? iPhone 3s, 4, 4, 5 and 5 have all different resolutions. And I use PNG or svg?

    If you are using the sensitive scale that it will permanently scale.

    To view best practices regarding graphics

    M lively help | Best practices for graphics in Adobe Edge animate

  • "One-click" How do I export an image to a set of files with different resolutions .png?

    Hello

    How far is 'one-click' export an image to a set of files with different resolutions .png? (I need for a set of iOS app icons).

    For example: export a file MyAppIcon.psd in the following:

    MyAppIcon_29x29.png

    MyAppIcon_57x57.png

    MyAppIcon_114x114.png

    MyAppIcon_512x512.png

    MyAppIcon_48x48.png

    MyAppIcon_72x72.png

    I almost managed to do with the Actions of Photoshop, but does not know how the names of files to include the name of the original image file. In other words, the NewApp.psd file should export to NewApp_29x29.png, not MyAppIcon_29x29.png.

    Thank you!

    No problem, please try this...

    #target photoshop
    app.bringToFront();
    main();
    function main(){
    if(!documents.length) return;
    var Name = app.activeDocument.name.replace(/\.[^\.]+$/, '');
    try{
       var Path = activeDocument.path;
        }catch(e){
            alert("Please save this file then re-run the script!");
            return;
            }
    var strtRulerUnits = app.preferences.rulerUnits;
    var strtTypeUnits = app.preferences.typeUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    snapShot();
    var saveFile = File(Path + "/" + Name + "_512x512.png");
    activeDocument.resizeImage(512, 512, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    revertToLastSnapshot();
    var saveFile = File(Path + "/" + Name + "_114x114.png");
    activeDocument.resizeImage(114, 114, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    revertToLastSnapshot();
    var saveFile = File(Path + "/" + Name + "_72x72.png");
    activeDocument.resizeImage(72, 72, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    revertToLastSnapshot();
    var saveFile = File(Path + "/" + Name + "_57x57.png");
    activeDocument.resizeImage(57, 57, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    revertToLastSnapshot();
    var saveFile = File(Path + "/" + Name + "_48x48.png");
    activeDocument.resizeImage(48, 48, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    revertToLastSnapshot();
    var saveFile = File(Path + "/" + Name + "_29x29.png");
    activeDocument.resizeImage(29,29, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    app.preferences.rulerUnits = strtRulerUnits;
    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    }
    function SavePNG(saveFile){
    var pngOpts = new ExportOptionsSaveForWeb;
    pngOpts.format = SaveDocumentType.PNG;
    pngOpts.PNG8 = false;
    pngOpts.transparency = true;
    pngOpts.interlaced = false;
    pngOpts.quality = 100;
    activeDocument.exportDocument(new File(saveFile),ExportType.SAVEFORWEB,pngOpts);
    }
    function snapShot() {
        var desc9 = new ActionDescriptor();
            var ref5 = new ActionReference();
            ref5.putClass( charIDToTypeID('SnpS') );
        desc9.putReference( charIDToTypeID('null'), ref5 );
            var ref6 = new ActionReference();
            ref6.putProperty( charIDToTypeID('HstS'), charIDToTypeID('CrnH') );
        desc9.putReference( charIDToTypeID('From'), ref6 );
        desc9.putEnumerated( charIDToTypeID('Usng'), charIDToTypeID('HstS'), charIDToTypeID('FllD') );
        executeAction( charIDToTypeID('Mk  '), desc9, DialogModes.NO );
    };
    function revertToLastSnapshot() {
       var doc = app.activeDocument;
       var hsObj = doc.historyStates;
       var hsLength = hsObj.length;
       for (var i=hsLength - 1;i>-1;i--) {
         if (hsObj[i].snapshot) {
           doc.activeHistoryState = doc.historyStates.getByName('Snapshot ' + i);
           break;
         }
       }
    };
    
  • How image rotation and displacement by using different origins

    Hello
     
    I use LabVIEW 8.5 and 8.5 of Vision.
     
    I need to rotate, scale, and move a 2D image regarding one aspect of the image. I use IMAQ turn and shift, but I don't know what is the point of reference or originally used in this function. The coordinates of the image is very important in my application because I need these details to complete the recording of the image.

    My question is as below:

    (1) the origin (0,0) of an image is located in the upper left corner, can I change it to the center of the image?

    (2) how can I specified a certain point (coordinated) as a reference for the rotation and scale?

    Your help is very appreciated. Thank you.

    Hello

    Thanks for the idea, I'll try it soon.

    Best wishes

  • Can I have the Microsoft themes that I have for my background, used as a screen saver?

    Is it possible that I can have Microsoft themes that I have for my background, used as a screen saver?  I really like the themes "CatsAnytime" and "CatEverywhere".  I have on my desk, and I'd like to see them as my screen saver too.  Is this possible?  If so, please tell me how.  Thank you.

    Original title: substantive and screensaver

    You can use the screen saver picture to view a slide show of your photos, and you can choose the same images that you use for your wallpaper.  Here's how I would start:

    1. Right-click on your desktop and go to personalize, and then click wallpaper down.
    2. Click on the photos that are highlighted, then select "Properties".
    3. Note the 'place' of images.  For example, mine says all C:\Windows\Web (yours will be different).

    4. When you know the location, click Cancel on the two and then go into the screen saver options.
    5. Choose the screen saver photos and set it up to use the folder that you found in step 3 above.

    That's all.  Now this folder of photos will be used for your screen saver.

  • Export to JPG format several times with different resolution

    Hello world

    I want to export my document of jpg files in different resolutions - an overview and a thumbnail image. I use this code, I found here in the forum for export:


    function exportPages (_dpi, _destFilename) {}

    try {}

    app.jpegExportPreferences.exportResolution = _dpi;

    app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.LOW;

    app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.EXPORT_ALL;

    app.scriptPreferences.version = "7.0".

    app.jpegExportPreferences.jpegColorSpace = JpegColorSpaceEnum.RGB;

    app.scriptPreferences.version = "6.0".

    app.activeDocument.sections.everyItem () .includeSectionPrefix = false;

    var f = file (_destFilename);

    app.activeDocument.exportFile (ExportFormat.jpg, f);

    } catch (err) {}

    Alert (err.message);

    }

    }


    and I call you


    exportPages (96, "~ / jdExport.jpg");

    exportPages (30, "~ / jdExportThumbnail.jpg");


    This should create images with 96 DPI and dpi 30. But after the first call the app.jpegExportPreferences.exportResolution is not defined. I can swap function calls - first works, second fails.


    No idea why I can't export twice?


    Thank you

    Klaus


    He finds myself - there the

    app.scriptPreferences.version = "6.0".

    I shouldn't use copy & paste the code from the forum without understanding

  • remove objects from the background using a clipping path

    A number of years, I've learned a very easy way to remove objects such as logos from backgrounds using masks and then saving them as .eps files that might be included in the InDesign documents without funds. You would simply use the magic wand to make a selection, inverse, create a path and the rest I do not remember.

    Simply, I can't find the notes I had on how to do it and can't remember the steps. It would literally take 2-3 minutes at the most to do.

    Does anyone know of this method, or something similar and very simple. At best, I am a Photoshop basic user.

    SRiegel wrote:

    You don't need to (and probably shouldn't) eps more use.  This is an obsolete format.

    The clipping path will read as well in a PSD or a TIF.

    You can also use any Photoshop path recorded as a trace of shadow in InDesign, even if it has not been identified as one in Photoshop.  Object > Clipping Path > Options allows you to choose a Photoshop path in the file.

    At took the words out of my mouth.  PSD is the preferred format for most applications these days.  You can choose to import as a single merged object or keep the layers.  EPS works well with Photoshop.

    In response to Sid, if you use a clipping path to draw a logo, then you might as well make the logo as a vector of the form of the original using as a model.  I regularly take this approach fuelled the logos of low resolution for things like sponsors etc.  Because you do not use the raster version, you can n to facilitate tracking it.  All the perpendicular lines of the limits of the image (don't know why I don't have not just "square") can be stored neatly by use of Guides, but you can also force the path points to have a square to the previous point by holding down the SHIFT key.  The resulting vector shapes can be saved as custom shapes, but I use libraries as you can organize them better.

  • Image resizing background for all screen sizes

    How can I make my background image to comply with different size screens?  I got it for my 27 "monitor, but it looked horrible on my laptop so I made it is smaller and its still do more fit my scree cell phone and it looks so small on my 27' now its horrible here.  Help, please?

    Hello

    I suggest you use this image as the fill for the browser.

    You can check the links on the filling of browser:

    Add an image to the background of the page or the browser. Muse CC tutorials Adobe check in from 02:00

    https://helpx.Adobe.com/Muse/using/using-fill-browser-fill-options.html

    Concerning

    Vivek

  • I use different e-mail accounts: I send an email with the sender A (standard!), email is archived to the sender sent archive and the email is sent to the sender, B

    A really strange problem!

    I use different e-mail accounts. I send an email with a sender (defined as standard!), email is archived in archive A sent from the sender, the sender is wrote in the header of the email as the sender, but the email is sent with the sender B written as the sender in the email received.

    Best regards, Michael

    It sounds like you do not use the right smtp server to send the e-mail.

    Please check what 'Sender A' smtp server account uses.
    'Tools' > 'Account settings' for the e-mail account
    or
    Right click on the email account in the folders pane, and then select "settings".
    Lower-right - outgoing (SMTP) server - select the correct SMTP server for that e-mail account.
    See the image below as an aid.
    Click OK

    If you are unsure about what to do please post the following information:

    In Thunderbird

    • Help > troubleshooting information
    • Click on 'copy text to the Clipboard.
    • In the forum, in this issue, right-click in a text box ' Post a reply ' and choose 'paste '.

    Tell me the number of the account which is "sender."
    Tell me the number of the account how recipient sees as venues.

  • layout with different resolutions

    Hello and Hello!

    Once more I need some advice:

    I have a program that is running on different machines with different resolutions.

    Is it possible to avoid, that the provision is paning all around?

    Best regards

    Hilby

    Hi Hilby,

    No.... This is currently a limitation of the layout, where we try to adapt to each screen, but objects and the page layout is not appropriate in different proportions with a different number of pixels.

    The aspect ratio is the most important, followed by the total of the resolution of the screen.

    Additional information about elongation are below.

    In summary, DASYLab is unable to completely adapt the layout "Screen" for the size of each screen and resolution. If you want to have a fixed provision which is not completely in some monitors, then consider using a size fixed, such as A4 or A3.

    If you do something on a large monitor, 1600 x 1200, for example, and move it to a screen wide monitor, 1600 x 900.

    Of my friends on Wikipedia

    With computer screens, wider than 4:3 aspect ratios are also known as widescreen. Computer monitors widescreen previously generally 16:10 aspect ratio, now they are moving in 16:9.

    Until the about 2003, most computer monitors had a 4:3 aspect ratio and some had 5:4. Between 2003 and 2006, monitors with 16:9 and especially 16:10 aspect ratios (8:5) became commonly available

  • Imaging multi channels using the acquisition card OR

    We have a 1408 IMAQ being controlled by LabVIEW 8.0.

    We want to install multi-channel of imagery. All the channels work individually. However, when I was trying to show two channels simultaneously, single channel works and I got the following error message:

    Error 1074397150 has occurred to IMAQ enter Setup.vi

    Possible reasons:

    NOR-IMAQ: A timeout error occurred while you wait for the specified event. If you expect a picture, make sure all the video data is acquired during the period. If you wait for a signal, check that the assertion of signal occurs within the period.

    Sometimes I get a different error message asking me to assign different buffers to both channels. I understand that IMAQ 1408 has only analog digital (ADC) converter to digitize the incoming video. It may acquire up to four different cameras, but only of a camera at a time.

    I don't mind do frame rate in half. I think to show only one channel at a time and do the two channels alternantly. But I need to know how config routes to get there.

    I've attached an example that should work.  I could not test it because I don't have the equipment, so it might need some settings.  I would test it with one channel by setting the channel # 1.  Once it works, define channels # 2.  I set the display to use snapshot mode so the same image can be used for all screens.

    The only reason that I can think of that would make multi-channel acquisition fail when single channel works is the lack of synchronization between signals.  The start of frame signal must be the same for all channels.

    Bruce

  • Load image into ImageView using file:///

    Hello

    According to this article http://supportforums.blackberry.com/t5/Cascades-Development-Knowledge/The-Different-Methods-of-Loadi... we should be able to load images QML using file:/// and absolute path.

    For the life of me I can't load an image not only of shared/accounts/1000/shared/subfolders, but even of the application data folder.

    Can someone share * work * example of loading images in ImageView using file:///

    Thank you.

    https://developer.BlackBerry.com/Cascades/documentation/UI/Image_Resources/content.html

Maybe you are looking for

  • restore new iphone 6s

    I back up my 6 64 GB iphone with manual backup, when I try to restore with my new iphone 6 s 128 GB, it's impossible because it says corrupted or incompatible. can anyone help? THX

  • xw6400 xw6600 xw8400 xw8600: Trim SSD support pilot solution ESB2 xw workstations

    EDIT: IT TURNS OUT THAT THIS PROBLEM EXISTS IN THE W10PRO64 INSTALL ON HP XW WORKSTATIONS AND PROBABLY OTHERS.  SEE THE MAIN 7/16 MESSAGE. I worked on a project to help another Member of this forum, and just made a significant breakthrough related to

  • Any access request camera iPad download of Skype on App Store

    I have an iPad 2 and you have downloaded Skype on the App Store. He asked for permission to access the microphone or camera, and while the cam does not work, the microphone works. This means that I can't make video calls. I have Skype went into the s

  • Classic BlackBerry cannot create a Mobile Hotspot on my classic

    I'm here in New Zealand with a classic parallel imported Mobile unlocked in the United Kingdom. I can't generate a mobile hotspot. I do all the things asked of me, but just scroll circle keeps scrolling. I get data and emails on the phone and I had t

  • X7.2.3 VCS OpenSSL vulnerability

    Hi all CSCuo16472 (https://tools.cisco.com/bugsearch/bug/CSCuo16472), we see that the vulnerability is fixed in X7.2.3 and X8.1.1. But in X7.2.3 covering memo, we cannot find any description about it. (In X8.1.1 we can find it). It's really fixed in