Bitmap class: how to use the directories under the directory res/img?

I have the following image resources structure.

RES/img

I added two subdirectories of img, hi_res and low_res, so my resource structure looks like:

RES/img/hi_res

RES/img/low_res

When I create a Bitmap object, I want to use a PNG image under hi_res such as:

Bitmap bg = Bitmap.getBitmapResource("hi_res/cool.png");

However, I return the following error in the Console:

[0,0] CAFETERIA: could not find hi_res/cool.png

I tried the structure of the whole package such as img/hi_res/cool.png and who fired a similar error. How to properly use packages in the res directory?

Well done.

Tags: BlackBerry Developers

Similar Questions

  • Is there an online class to learn exactly how to use the command prompt which is quite through. OR y at - it clear a book that explains in detail for this? Who should I contact?

    I would like to know how to use the command prompt.  The nethodology type in the cmd prompt with the syntax and the Liposuction, in other words, the real return to a command prompt. I downloaded about evertthing I can find about this, but can't seem to put it all.

    My OS is Windows XP Pro sp3, lots of RAM, my address is * address email is removed from the privacy *.   I would like to take a rough online study if one is available if it is not too expensive.

    It really depends on what you mean by "to a command prompt."

    If you open a command prompt window (for example, in start > run > cmd > OK), you can enter a number of orders.  The list of available commands, including their syntax, is here--> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true

    You can also follow the links here:http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_o.mspx

    If you want to get more sophisticated - automating command-line tasks - you can start here: http://technet.microsoft.com/en-us/scriptcenter/default.aspx

  • How to use the RMI Stub class in programming?

    Hi all

    I'm new to the RMI.

    Can someone explain to me how to use the RMI Stub generated by calling command CRIM?
    For my tests, I can only call object rmi through its remote interface method. So what heel is when we are coding?

    I appreciate anyone's help.

    Thank you very much
    Xianyi.Ye

    When the remote object is committed to the registry, which is actually linked is the draft.

    So when the client performs a search in the registry, as it gets is the heel. However from the point of view of the customer, it's just a mystery object that implements the remote interface.

    So you must use it directly, it's all automatic.

  • How to use the device as a simulator.

    Hi all

    Can someone tell me how to use the device (with my development pc) as Simulator.

    Whenever I need to check the appilcation in device of signed files .cod that is compiled in the Simulator.

    Because I got the outofmemory error in the device rather than simulator.

       

    Thus, any solution which signed without how can I check my direct request to the device itself. Any setting in preferences or etc...

    Thank you

    Tejas

            

    The only way you should not sign the cod is if no controlled classes/interfaces are used. The easy way to find out is to open the SignatureTool and see if your application requires signature. Otherwise this says icefrost1 's good enough solution.

  • using the function - how to use the values of the input variables on the table select statement names

    Hello community, I have a problem when creating a function. The purpose of this function is to check the table of weather gave yesterday or not. We must check this on different tables on different sachems. We are creating a function with input variables.

    CREATE OR REPLACE FUNCTION IN_SCHEMA.IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    )

    RETURNS INTEGER

    AS

    -Declaring variables

    v_is_true INTEGER.

    BEGIN

    SELECT

    CASE

    WHEN MAX (in_datefield) = TRUNC(SYSDATE-1)

    THEN 1

    ON THE OTHER

    0

    END

    IN

    v_is_true

    Of

    in_schema.in_tablename

    ;

    RETURN v_is_true;

    END;

    /

    When creating, I got error: [error] ORA-00942 (44:19): PL/SQL: ORA-00942: table or view does not exist

    How to use the values of the input variables on the table select statement names?

    Hello

    Here's a way you can use dynamic SQL statements for this task:

    CREATE OR REPLACE FUNCTION IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    in_first_date DATE DEFAULT SYSDATE - 1,.

    in_last_date DATE by DEFAULT NULL

    )

    RETURNS INTEGER

    AS

    -IS_YDAYDATA_TO_TABLE returns 1 if in_schema.in_tablename.in_datefield

    -contains all the dates in the in_first_date of the range through included in_last_date

    - and it returns 0 if there is no such lines.

    -If in_last_date is omitted, the search only the data on in_first_date.

    -If in_first_date is omitted, it defaults to yesterday.

    -Time parts of the in_first_date and in_last_date are ignored.

    -Declaring variables

    sql_txt VARCHAR2 (1000);

    v_is_true INTEGER.

    BEGIN

    sql_txt: = 'SELECT COUNT (*).

    || 'FROM ' | in_schema | '.' || in_tablename

    || 'WHERE ' | in_datefield | ' > =: d1'

    || «AND» | in_datefield | '< >

    || 'AND ROWNUM = 1';

    dbms_output.put_line (sql_txt |) '= sql_txt in IS_YDAYDATA_TO_TABLE");  -For debugging

    Sql_txt EXECUTE IMMEDIATE

    IN v_is_true

    With the HELP of TRUNC (in_first_date) - d1

    TRUNC (NVL (in_last_date

    in_first_date

    )

    ) + 1                -- d2

    ;

    RETURN v_is_true;

    END is_ydaydata_to_table;

    /

    DISPLAY ERRORS

    If you must use dynamic SQL statements, put all the SQL statement in a single string variable, such as sql_txt in the example above.  In this way, you can easily see exactly what will be executed.  Comment out the call to dbms_output under test is completed.

    Try to write functions that will address not only the question that you have now, but similar questions that you may have in the future.  For example, now that interest you only to the verification of the data of yesterday, but later, you might want to check another day or range of days.  The above function combines the convenience of a function simple (looks like yesterday data if you don't tell him otherwise) with the power of a more complex function (you can use the same function to check any day or range of days).

  • After replacing the motherboard of PC how can use the license package, is the same hard drive.

    Mr President, our pc is repaired & change the motherboard and now how to use the product under license of photoshop

    It could be cleaner if you uninstall the products in question, using the CS cleanup tool and then contact Adobe technical support via chat and ask to reset your activations before install and activate the software again.

    Adobe Creative Suite cleanup tool

    helps resolve installation for CS3 thru CS6 and creative cloud problems

    http://www.Adobe.com/support/contact/cscleanertool.html

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat

    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

    Before you uninstall, you can see if you can extract the serial number in case you don't have it at hand.

    If it's a Windows machine, and then try running Belarc Advisor

    http://www.Belarc.com/free_download.html

    For a Mac, you can try:

    https://Mac-product-key-Finder.com/

  • I don't know how to use the method (PDDrawPageOrCosObjectToBuffer) in the Mac environment.

    Use the method of PDDrawPageOrCosObjectToBuffer of Acrobat SDK from DC () in the Mac environment,

    I want to get a screenshot of the PDF in the bitmap to the screen.

    A description of PDDrawPageOrCosObjectToBuffer () in Acrobat DC SDK API references, but I do not understand how to use the method.

    Please tell me this use.

    If there is a code example using PDDrawPageOrCosObjectToBuffer (), I'm happy.

    Hello

    My code is finally working with PDDrawPageOrCosObjectToBuffer. I hope it helps someone:

    void releaseBufferForCG (void * / * info * /, const void * data, size_t / * size * /)

    {

    Free ((void*) Data);

    }

    CGImageRef CAcrobatBitmapCreator::ConvertToBitmap (const PDPage & i_rPDPage,

    ASFixedMatrix & i_rTransform,

    int & i_rBitmapWidth,

    int & i_rBitmapHeight)

    {

    Get the rect in user-space coordinates update

    ASRealRect updateRectReal = {0,0,0,0};

    ASFixedRect boxFixed;

    PDPageGetBBox (i_rPDPage & boxFixed);

    updateRectReal.top = ASFixedToFloat (boxFixed.top);

    updateRectReal.left = ASFixedToFloat (boxFixed.left);

    updateRectReal.right = ASFixedToFloat (boxFixed.right);

    updateRectReal.bottom = ASFixedToFloat (boxFixed.bottom);

    Convert the fixed transformation matrix to real

    ASRealMatrix transformReal = {0, 0, 0, 0, 0, 0};

    transformReal.a = ASFixedToFloat (i_rTransform.a);

    transformReal.b = ASFixedToFloat (i_rTransform.b);

    transformReal.c = ASFixedToFloat (i_rTransform.c);

    transformReal.d = ASFixedToFloat (i_rTransform.d);

    transformReal.tx = ASFixedToFloat (i_rTransform.h);

    transformReal.ty = ASFixedToFloat (i_rTransform.v);

    ASRealRect destRectReal = {0, i_rBitmapHeight, i_rBitmapWidth, 0}; l, r, t, b

    Prepare the buffer for drawing https://forums.adobe.com/thread/1850089

    This first call to PDDrawPageOrCosObjectToBuffer is only used to get the size of the buffer.

    ASCab flags = ASCabNew();

    ASInt32 bitsPerChannel = 8;

    ASUns32 bufferSize = PDDrawPageOrCosObjectToBuffer (i_rPDPage,

    CosNewNull(),

    ASAtomFromString ("DeviceRGB"),

    NULL,

    NULL,

    bitsPerChannel,

    flags,

    9,

    NULL,

    & transformReal,

    & destRectReal,

    & updateRectReal,

    NULL,

    0,

    (NULL);

    char buffer = (char *) malloc (bufferSize);

    Memset (buffer, 0xff, bufferSize);

    Draw in the buffer

    ASCabPutBool (flags, kPDPageUseAnnotFacesStr, true);

    ASCabPutBool (flags, kPDPageDrawSmoothTextStr, true);

    ASCabPutBool (flags, kPDPageDrawSmoothLineArtStr, true);

    ASCabPutBool (flags, kPDPageDrawSmoothImageStr, true);

    bufferSize = PDDrawPageOrCosObjectToBuffer (i_rPDPage,

    CosNewNull(),

    ASAtomFromString ("DeviceRGB"),

    NULL,

    NULL,

    bitsPerChannel,

    flags,

    9,

    NULL,

    & transformReal,

    & destRectReal,

    & updateRectReal,

    buffer,

    bufferSize,

    (NULL);

    Convert buffer CGImage

    // 1. Remove the 4 bytes of padding at the end, in a new buffer.

    size_t bytesPerRow = (i_rBitmapWidth * 3);

    bytesPerRow = (bytesPerRow % 4 == 0? bytesPerRow: bytesPerRow + (4-(bytesPerRow % 4)));

    size_t bytesPerRowForGC = i_rBitmapWidth * 3;

    size_t bufferCGSize = bytesPerRowForGC * i_rBitmapHeight;

    char * bufferForGC = (char *) malloc (bufferCGSize);

    Memset (bufferForGC, 0xff, bufferCGSize);

    for (int lineIndex = 0; lineIndex)< i_rbitmapheight;="">

    {

    char * destGCPtr = bufferForGC + (lineIndex * bytesPerRowForGC);

    char * srcPtr = buffer + (lineIndex * bytesPerRow);

    If ((srcPtr + bytesPerRowForGC)<= (buffer="" +="" buffersize)="" &&="" (destgcptr="" +="" bytesperrowforgc)=""><= (bufferforgc="" +="" buffercgsize)="">

    {

    memcpy (destGCPtr, srcPtr, bytesPerRowForGC);

    }

    on the other

    {

    break;

    }

    }

    // 2. Create a CGImage using the new buffer.

    CGDataProviderRef provider = CGDataProviderCreateWithData (NULL,

    bufferForGC,

    bufferCGSize,

    releaseBufferForCG); Buffer are ions released this reminder

    Space color CGColorSpaceRef = CGColorSpaceCreateDeviceRGB();

    CGImageRef finalImage = CGImageCreate (i_rBitmapWidth,

    i_rBitmapHeight,

    bitsPerChannel,

    bitsPerChannel * 3.

    bytesPerRowForGC,

    color, space

    kCGImageAlphaNone,

    provider,

    NULL, / / decode (of remapping the colors)

    true, / / interpolate (pixel smoothing)

    kCGRenderingIntentDefault);

    CGColorSpaceRelease (colorspace);

    CGDataProviderRelease (provider);

    Free (buffer);

    FinalImage return;

    }

    David

  • How to use the command line in w/Merge Vista?-need to cut password expires...

    I use Vista Home Basic by Fusion on a Mac Intel. The instructions to stop Vista expire a password is to use the command-line under Vista. I already know these instructions, so my question is:

    How to use the command line inside Vista, on a virtual machine?

    Thanks for your help in advance, I don't want to mess something else.

    Jacob.

    With assistance from the command-line on Vista is no different if it is to be run on a virtual machine or on a physical machine, so just like you would on any physical machine.

  • How to use the same services-config for servers the and remote.

    My flex project works very well using the bottom but when I download my flash on the server I do not work, all the files and related paths are the same execpt remote is a linux server.

    <? XML version = "1.0" encoding = "UTF-8"? >
    <>services-config
    < services >
    < id = 'amfphp-flashremoting-service' service
    Class = "Flex.Messaging.services.RemotingService"
    messageTypes = "flex.messaging.messages.RemotingMessage' >"

    < destination id = "amfphp" >
    <>channels
    < Ref channel = "my-amfphp" / >
    < / channels >
    Properties of <>
    < source > * < / source >
    < / properties >
    < / destination >
    < / service >
    < / services >
    <>channels
    < channel-definition id = "my-amfphp" class = "mx.messaging.channels.AMFChannel" >
    " < endpoint uri = ' http://localhost/domainn.org/AMFPHP/gateway.php "class="flex.messaging.endpoints.AMFEndpoint"/ > "
    < / channel-definition >
    < / channels >
    < / services-config >

    I think the problem is the line


    " < endpoint uri = ' http://localhost/domainn.org/AMFPHP/gateway.php "class="flex.messaging.endpoints.AMFEndpoint"/ > "

    but I don't know how to use the same services-config for servers the and remote.

    I'll back up a bit.

    Breakpoint URLS are defined as follows in the services - config.xml:

    https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure

    The meaning of each of the tokens is clearer when we see them as part of a complete url. If your context root is set to http://localhost , then I have no idea how your application runs in any environment.

    If you leave the server.name and server.port chips in your configuration file, then they will be replaced when executing according to the location from which your application is served. However, the context.root token is replaced at the time of the compilation based on the value that you specify in Flex Builder or when calling mxmlc.

    In order to reuse your file services - config.xml, you must use the same context-root on your development environment and to your deployment environment.

  • With no headphone jack, how to use the iPhone in my car 7

    Okay, so here's the challenge.  I have a power source and a headphone and not Bluetooth.  It works perfectly with iPhones before 7.  But with 7, it isn't possible to use the same configuration I had for years.  I own my car, and I have no interest in buying a new car just to support a new phone.  And since this will be a problem for the years to come if I stay with Apple, I would like to know what are the solutions are available.

    So, how to use the new iPhone 7 while remaining responsible and using my car speakers?  Dongles Bluetooth that I need to reload, it's probably not.

    Thus, looking for ideas that might have people.  I can't be the only one with this concern.

    It's almost a certainty that a third party adapter will appear quickly. The new Macbook has a single port usb - c and people asked the same question, 'how to load and use USB at the same time." There are today dozens of solutions for the Macbook, and then it will be with the iPhone 7. An adapter with a 3.5 mm jack and a port of loading Lightening would be my guess. Kickstarter entrepreneurs are probably already working on it.

  • How to use the capture and the print button

    I tried to figure out how to use the capture and the "print" button, or add or what you call. I press it and the whole page of a different color changes, so I try to cut the section I want but I don't know how to send it to the printer. Can someone help me with this. I'm not at savvy with tech stuff, but when I find a recipe or something and it doesn't have an option to print a certain area, I can't understand how to use it?

    Thank you

    Andi Starbuck

    That happens to me is, I click and drag to make a rectangle of yellow selection, and as soon as I raise my finger on the mouse button, the part I've selected is captured as an image, a new tab opens and preview before printing, the image display. I can use the installation of the Page or simply print. But if I close the preview, this temporary image vanishes and I'm back on the page where I started. You see something different?

  • How to use the activity monitor to remove MegaBAckup on my mAc Book PRO?

    How to use the activity monitor to remove MegaBAckup on my mAc Book PRO?

    Download and run MalwareBytes. Malwarebytes was developed by one of our colleagues here to ASC. He received rave reviews and is on the more proven anti-malware for Mac software.

  • How to use the utility disk first aid for hard drive internal el captian

    How to use the utility disk first aid for hard drive internal el captian

    Select the drive and click first aid.

    If something is not repairable because this is the system drive, then you need to start using the recovery partition and run disk utility it.

  • How to use the Print Screen function?

    I've seen various descriptions of how to use the print screen function.

    It would be nice to actually tell one that works.  None have worked for me.

    [Fn] and Prt SCr does not work.

    CTRL and Prt SCr does not work.

    CTRL, Alt, and Prt SCr does not work.

    [Fn], Ctrl and Prt SCr does not work.

    If anyone knows the correct method to activate the screen capture function which would be a good thing.

    From the looks of things, HP has a big problem with this function.

    Here's a microsoft articleon the use of the screenshot function.

    This should answer your questions.

    Thanks for taking a peek.

  • How to use the acronym

    How to use the acronym instead of this?

    Please explain

Maybe you are looking for

  • Minimized external program

    Hello everyone (sorry for my English)... I have this problem: I need to catch when an external program window is reduced to the minimum. Then LabVIEW knows this? I need to run an external program (I did) and then expected her reduced to continue. Tha

  • How can I remove e-mail addresses duplicates in Windows Mail?

    in windows mail on vista pc how to remove addresses double.I mean those send emails to ignore u u.There are 3 for 1 friend email addresses but 2 have types now I continue to by selecting the rong wen 1 I press the first letter.PS they are not contact

  • How to retrieve selected item via onSelectedValueChanged picker?

    Hi all I would like to display the selected word Picker but how to retrieve the value selected picker using onSelectedValueChanged?How and where to report this var dataModel.data (row) = selectedItem; on the pickers?Pickers use row or rootIndexPath?

  • Languages Smartphones BB8830 blackBerry

    I would like to pick a couple of different languages for my BB8830.  Yet, when I go to Wizard Setup and from there to Langauges.  I have only 2 choices is English and English (United States).  Following the instructions told me that if I want a diffe

  • Is it normal to have the process explorer.exe?

    Original title: 2 explorers .exe HelloI have 2 process called explorer.exe. is this normal in win 7 x 64?