Image taken from server and display on the screen

Hello Sir

I'm new to the development of Blackberry, I use a webservie that returns the image in . Its a Web service written in DotNet Framework. I'm trying to convert bytes it so that I can conver bitmap and use it on the screen.

I think I'm losing a date when the dat of conversion to Byte]

connection_for_image image_connection = new connection_for_image();

raw Byte [] = image_connection.get (URL);
Dialog.Alert ("control returned 1 size =" + raw.length);
           
try {}
                  
Bitmap_image bitmap = new Bitmap (Bitmap.ROWWISE_MONOCHROME, 50, 50, gross);
                    
Image BitmapField = new BitmapField (bitmap_image);
Add (image);
                 
} catch (Exception e) {}
Dialog.Alert ("catch" + e.getMessage ());
}

After running the above code a few image is displayed in black and white, but even once, is not the image I am downloading from webservice.

In the connection class that I'm parsing the data type in bytes using following code

data Byte [] = null;

I have String = d.MySplitName (content, "",")<>
data = i.getBytes ();
return data;

Here, I'm a little frustrated because you don't seem to listen to what I tell you.

"How to convert byte [] Base64Binary data.

"Is there a way by which I can convert the base64Binary byte data.

Please read carefully what I suggested that you make.  You should be able to determine the raw bytes that has your Web server.  The Web Service then converts it to text he sends you.  You should be able to convert it to bytes that were originally used.  You have enough information in this thread already do.  Please confirm this part of the treatment before you do anything else.

"then use these data to display the byte [] in the bitmap file.

That's where I think your problem is.  Look at the code I gave you in the last post.  But you will need to know the format of the raw bytes that are stored on your Web server and sent to you.  Then find a way to convert them into a Bitmap image on the device - method may depend on how the bytes are stored on your Web server.  It might be that the bytes that are sent to you are already in a Blackberry bitmap format, but I doubt it.

So please make sure that you have correctly found the bytes of the raw image.  When this is correct, you know that your network stuff working.  Once you've done that, then you have to find a way to convert the bytes of the Bitmap image.

If the byte [] is supported by JSR 172 is not relevant at this stage.

Tags: BlackBerry Developers

Similar Questions

  • How to retrieve the image BLOB from database and display the image in rtf file using the Oracle XML Desktop 5.6.2 publication server?

    Hi all

    Here I have the image BLOB in the database files,

    I want to show the image to PDF using file to rtf using Oracle Xml Desktop Publisher,

    Hi all

    I found the solution for reading Image BLOB of data base & display in Pdf format.

    (1) read the image from DB.2) and then copy the picture using IO. UtilsCopy method to copy the picture

    (3) then encode with base64 converter then you will get the tag XML with Base64 as string then placed in your XML Code & preview the output, you will find the image

    Photo = (BlobDomain) currentRow.getAttribute ("Image");

    ByteArrayOutputStream OutputStream = new ByteArrayOutputStream();

                        Byte [] imageByte;
                          Byte [] b = null;
                        try {}
                        
                            IOUtils.copy (photo.getInputStream (), outputStream);
                            BS = outputStream.toByteArray ();
                            outputStream.flush ();
                            System.out.println("==="+BS.) Length);
                            Encoded byte [] is Base64.encodeBase64 (bs).;
                            encodedString = new String (encoded);
  • gauge power and display on the screen...

    Hello

    I have X 201 laptop computer.

    Yesterday, I installed UltraISO application and probably withdrawn on-screen display (I do not now see the Visual notifications when I change volume) and be able to gauge icons (no visual information about the battery).

    In addition, the application vault password for fingerprints disappeared.

    When I go into Control Panel, I see that everything is working: power meter is supposed to have the value WE and also single sign - on...

    -Michael

    Hello

    It is useful that you reinstall all power and utility Hotkey handler.

    Those who can be found here http://www-307.ibm.com/pc/support/site.wss/MIGR-70656.html

  • Why pdf files not open in firefox and display on the screen?

    I'm unable to view pdf files in firefox and do Explorer as default. Why is this happening?

    This link shows you the settings that should be checked - https://support.mozilla.com/kb/Opening+PDF+files+within+Firefox

  • Error on image from the server and display streaming

    Hi all

    Im trying to read an Image that origin of the server and displays on a screen

    Here's the code I'm using to broadcast the image.

    It is streaming on my Simulator as well as on some devices.

    But on some devices, it's not streaming and throw an exception.

    public UrlToEncodedImage(String url)
    {
    HttpConnection connection = null;
    InputStream inputStream = null;
    byte[] dataArray = null;
    
    try
    {
    connection = (HttpConnection) Connector.open(url+getConnectionString(), Connector.READ, true);
    inputStream = connection.openInputStream();
    byte[] responseData = new byte[10000];
    int length = 0;
    StringBuffer rawResponse = new StringBuffer();
    while (-1 != (length = inputStream.read(responseData)))
    {
    rawResponse.append(new String(responseData, 0, length));
    }
    int responseCode = connection.getResponseCode();
    if (responseCode != HttpConnection.HTTP_OK)
    {
    throw new IOException("HTTP response code: "+ responseCode);
    } 
    
    final String result = rawResponse.toString();
    dataArray = result.getBytes();
    }
    catch (final Exception ex)
    { }
    
    finally
    {
    try
    {
    inputStream.close();
    inputStream = null;
    connection.close();
    connection = null;
    }
    catch(Exception e){}
    } 
    
    bitmap = EncodedImage.createEncodedImage(dataArray, 0,dataArray.length);
    // this will scale your image acc. to your height and width of bitmapfield
    
    int multH;
    int multW;
    int currHeight = bitmap.getHeight();
    int currWidth = bitmap.getWidth();
    if(currHeight>350&&currWidth>350){
        bitmap=scaleToFactor(bitmap,currWidth,currHeight,Display.getWidth()-20,250);
    }
    
    }
    public EncodedImage getEncodedImage()
    {
    return bitmap;
    }
    public  EncodedImage scaleToFactor(EncodedImage encoded, int curWidth, int curHeight, int newWidth,
            int newHeight)
    {
         int numerator_width = Fixed32.toFP(curWidth);
         int denominator_width = Fixed32.toFP(newWidth);
         int scale_width = Fixed32.div(numerator_width, denominator_width);
    
         int numerator_height = Fixed32.toFP(curHeight);
         int denominator_height = Fixed32.toFP(newHeight);
         int scale_height = Fixed32.div(numerator_height, denominator_height);
    
         return encoded.scaleImage32(scale_width, scale_height);
    }
    private static String getConnectionString()
    {
        String connectionString = null;
        if(DeviceInfo.isSimulator())
        {
                if(UrlToEncodedImage.USE_MDS_IN_SIMULATOR)
                {
                       connectionString = ";deviceside=false";
                }
                else
                {
                       connectionString = ";deviceside=true";
                }
        }
        else if(WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED)
        {
           connectionString = ";interface=wifi";
        }
    
        else if((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_DIRECT) == CoverageInfo.COVERAGE_DIRECT)
        {
            String carrierUid = getCarrierBIBSUid();
            if(carrierUid == null)
            {
             connectionString = ";deviceside=true";
            }
            else
            {
               connectionString = ";deviceside=false;connectionUID="+carrierUid + ";ConnectionType=";
            }
        }                
    
       else if((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS)
        {
          connectionString = ";deviceside=false";
        }
    
       else if(CoverageInfo.getCoverageStatus() == CoverageInfo.COVERAGE_NONE)
        {}
        else
        { connectionString = ";deviceside=true";} 
    
        return connectionString;
    }
    private static String getCarrierBIBSUid()
    {
        ServiceRecord[] records = ServiceBook.getSB().getRecords();
        int currentRecord;
    
        for(currentRecord = 0; currentRecord < records.length; currentRecord++)         {             if(records[currentRecord].getCid().toLowerCase().equals("ippp"))             {                 if(records[currentRecord].getName().toLowerCase().indexOf("bibs") >= 0)
                {
                    return records[currentRecord].getUid();
                }
            }
        }
    
        return null;
    }
    

    The underlined part of the code is where the uid is sent as public _.

    Please, look in the code and let me know where the error is, or is there a better way to disseminate the image.

    In the hope that you hear.

    Thank you & best regards

    Krishnan

    Hello

    I found the error.

    It's in the URL sent by the server.

    The URL consisted of http://google.com

    But the format required to retrieve the image on several device would be http://www.google.com.

    Thanks for anyone who tried to help him.

    Krishnan.

  • Apex 5 display image field, control width and height on the form page

    Hello everyone,

    I try to display the image from a blob directly column on the page, it does not work well, here's my question, how can control the width and height of the screen image field, because its changing dynamically the size of the screen according to the original dimensions, I want to set the dimensions.

    Any help will be appreciated.

    Concerning

    Anil

    set the width and height attributes in the attributes of the image html elements

    for example Width = "200" height = "100".

  • In the latest versions of FireFox, there's a display option which allowed a change in the size of the fonts and objects on the screen temporarily on the fly. This seems to be missing from version 6.

    In the latest versions of FireFox, there's a display option which allowed a change in the size of the fonts and objects on the screen temporarily on the fly. This seems to be missing from version 6. It was very useful and should be added to version 6.

    https://support.Mozilla.com/en-us/KB/how-do-i-customize-toolbars

    If you mean the - and + Zoom control so it is always there in Firefox 6.0

    or
    View-> Zoom

    Edit: I see that you are using Windows 7 where the menu bar is hidden as a Firefox orange button by default. Some menus objects much may not be visible in the menu of the Firefox button. Show the Menu bar or use the - and + Zoom controls buttons.

  • Powers on my computer, but no image is displayed on the screen.

    Powers on my computer, but no image is displayed on the screen.

    You forgot to tell us something about your computer. You hear any sound from the computer at all once you turn it on, it? It sounds like the hard drive turning upward? You see absolutely nothing on the screen? Be more descriptive and include information about your computer (computer desk/computer laptop/brand-model), his age, and precisely what happens when you turn on the computer. It is a hardware problem and narrowing of component that failed is not possible without more information from you.

    http://www.elephantboycomputers.com/page2.html#Hardware_Tshoot

    If you can't do the work yourself (and there is no shame in admitting this isn't your cup of tea), take the machine to a professional computer repair shop (not your local equivalent of BigComputerStore/GeekSquad).

    MS - MVP - Elephant Boy computers - don't panic!

  • Images JPG, stored in DB, are not displayed on the screen/image.

    Hi friends,

    I have a form to save and retrieve images (JPG, GIF, TIF) to and from the DB, using WEBUTIL_FILE_TRANSFER. CLIENT_TO_DB and CLIENT_IMAGE. WRITE_IMAGE_FILE respectively.
    It works fine, but with few JPG images, it stores in DB, but not displayed on the screen/image.
    Second, if I try to retrieve and write the JPG to the operating system (using CLIENT_IMAGE. "" WRITE_IMAGE_FILE), he invited error "FRM-47101: cannot write the file image.

    Environment:
    Forms [32 bit] Version 10.1.2.0.2
    Operating system XP Pro 2002 SP3
    Oracle DB 11 g Enterprise Edition rel. 11.1.0.7.0 - 64 bit

    Any help will be much appreciated.

    Hello

    Some recent JPEG formats are not supported by the forms. I can't tell you exactly what, but I have already noticed that some images could be made only by the forms. The only solution is to save the images with another program to transform the internal format to a recognize an or use a Java Bean able to read all of these formats.

    François

  • Loginoff, save your settings and Windows stops no display on the screen, every time I stop my Windows XP Professional SP3

    Hi all

    Hi Patfaucher1974,
     
    Your question seems incomplete. When you say "Windows is no display on the screen stop" means that you do not get the screen that says "closing Windows"?
    -You are unable to shut down your computer?
    -If so, can remind you to make changes to your computer between the calendar when things worked fine and now?
     

    Try the steps listed in the article below and check if that helps you:

    Your computer stops responding when you try to shut down in Windows XP

    Additional reference on:

    Advanced Troubleshooting for shutdown problems in Windows XP

  • My computer is connected to the Windows 2008 R2 server and some of the users on this computer receive their network drive mapped on group policy and some do not.

    My computer is connected to the Windows 2008 R2 server and some of the users on this computer receive their network drive mapped on group policy and some do not.  I find nothing in Event Viewer that shows that there is a problem.  Please let me know what to do to get the disks appears

    Original title: Network Networking file sharing file sharing file sharing file sharing discovery sharing Fileshare share shared

    Hi,

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

    TechNet Forum

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

     

    Hope this information helps.

  • could not find a server reports and analysis hyperion running on localhost port 6800. Please check your connection string server and verify that the server is

    Hi all

    We have properly installed and configured Hyperion Reporting and analysis 11.1.2.4 in windows 2012 server however when I try to logint to the workspace, I get an error like "start-up of the specified document does not exist in the repository." "Select a new start under the General Preferences tab document" monitoring of "could not find a server reports and analysis hyperion running on localhost at port 6800. Please check your connection string server and verify that the server is up '.



    10.PNG


    11.PNG

    HyS9RaFramework_epmsystem2-syserr:

    GsmNotFound

    com.brio.one.services.globalservicemanager.GSMException: GsmNotFound

    at com.brio.one.services.globalservicemanager.GSMFactory.getGSM (unknown Source)

    to com.brio.one.client.ClientFactory. < init >(Unknown Source)

    to com.brio.one.client.ClientFactory. < init >(Unknown Source)

    to com.brio.one.client.ClientFactory$ ClientFactoryInitializer.connect (unknown Source)

    at com.brio.one.client.ClientFactory.getClientFactoryConnect (unknown Source)

    at com.brio.one.client.ClientFactory.getDefaultGSM (unknown Source)

    at com.brio.one.web.properties.ApplicationProperties.getDefaultGSM (unknown Source)

    at com.brio.one.web.properties.ApplicationProperties.getDefaultGSMContext (unknown Source)

    at com.sqribe.WS.WSBaseServlet.setDefaultGSMContext (unknown Source)

    at com.sqribe.WS.WSBaseServlet.initLogging (unknown Source)

    at com.sqribe.WS.WSBaseServlet.loadConfiguration (unknown Source)

    at com.sqribe.WS.WSBaseServlet.init (unknown Source)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletInitAction.run (StubSecurityHelper.java:283)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)

    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)

    to weblogic.servlet.internal.StubLifecycleHelper. < init > (StubLifecycleHelper.java:48)

    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)

    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1981)

    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1955)

    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1874)

    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3155)

    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1518)

    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:487)

    to weblogic.application.internal.flow.ModuleStateDriver$ 3.next(ModuleStateDriver.java:427)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)

    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)

    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)

    to weblogic.application.internal.flow.ModuleStateDriver$ 3.next(ModuleStateDriver.java:427)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)

    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)

    to weblogic.application.internal.BaseDeployment$ 2.next(BaseDeployment.java:672)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)

    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:59)

    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)

    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)

    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)

    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)

    to weblogic.management.deploy.internal.DeploymentAdapter$ 1.doActivate(DeploymentAdapter.java:52)

    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)

    to weblogic.management.deploy.internal.AppTransition$ 2.transitionApp(AppTransition.java:31)

    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:261)

    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:246)

    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:170)

    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:124)

    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:181)

    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:97)

    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    In the workspace, it shows that the Service is pending.

    14.PNG

    EMP Diagnostic Report:

    13.PNG

    Can help kindly out how should I solve this problem.

    I restarted the services and rebooted the Machine but still getting the same error.

    Kind regards

    VJ


    Hello

    I've reconfigured the Reporting, analysis, and everything by, I chose "Drop table" and the issue was resolved.

    Kind regards

    VJ

  • How do I register a very old acrobat from adobe and then download the upgrade? It seems that the serial number is not consistent with the serial number required by the adobe Web site. My serial number starts with the letter instead numbers.

    How do I register a very old acrobat from adobe and then download the upgrade? It seems that the serial number is not consistent with the serial number required by the adobe Web site. My serial number starts with the letter instead numbers.

    Please see:

    Redeem your student and teacher edition purchase, convert a redemption code to a number of series and much more .

    I hope this helps.

    Concerning

    Megha Rawat

  • Firefox will not display on the screen even though with Process Explorer, I see active Firefox.exe but no CPU usage

    I use Firefox as default browser v10.0.2 on Dell XPS8300 Intel Core i5 and Windows 7 Ultimate and Compaq Presario CQ57 IO IO Intel Core i3 and Windows 7 Home. More frequently on the (approximately 90% of attempts) that Dell (50% of attempts) Firefox will not display on the screen when I click the icon. Cannot display other programs when it happens. I expressly say display because I believe that Firefox has started. To work around the problem, I installed Process Explorer on both machines and launch this program first, then click on the Firefox icon. When the problem occurs I see process Firefox.exe in the list of processes; some CPU consumed but, then, no CPU activity. If I click on the Firefox icon, yet another process opens in the list of processes, but with the same answer - some consumed CPU and then no CPU activity. If I have 2 processes running and kill the process from the 1st, the 2nd poster and then everything is normal. If I do not open it treat a 2nd, but kill the 1st process then click the Firefox Firefox is displayed and all then is normal. This problem has occurred since the original on the two new machines installation. I have updated the video drivers on both computers.

    OK, let's see if we can solve this problem and make it work for you!

    First of all, if you start Firefox in safe mode (restart your computer first, then when you open Firefox, hold down the SHIFT key) it starts more reliable? This is usually caused by a defective module. If this does not help, then restart Firefox, go to the Firefox, then add-ons button and disable your extensions one by one until you find the troublemaker.

    Also, try to update to Firefox 11, it has several bug fixes that might make life easier here.

    Just as a few troubleshooting steps base to ensure that we have all the bases covered,
    Run all Windows updates, install all required service packs, etc.

    Update all of your plugins (Flash, Java, etc.): http://www.mozilla.org/plugincheck/.

    Download and install MalwareBytes Anti-Malware, run a full scan. http://www.malwarebytes.org/. This check allows that there is no virus on your computer, causing problems. You can uninstall this program after having cleaned the infections.

  • 2010 15 "MacBook Pro unexpected stops and defects of the screen

    As stated in the subject, I have a 2010 15 "MacBook Pro that runs on OSX Mavericks.

    I have experienced unexpected stops and, more recently, the screen glitches (see photos).

    I also have this message since Photoshop at a secure startup: "Photoshop gave up waiting for the assessment of the display driver.  Improvements using graphics hardware have been disabled.  Check the Web site of the manufacturer for the latest version of the software.

    Please review my images for more information.  I made a Starter course and managed to back up my computer (took 6 hours).  Now, I just need to fix it.

    PROPOSED ISSUE: I think I'll have problems of GPU and is forced to remove my components materials dust or replace certain parts.

    Please let me know if you have any ideas or solutions that could make me run!  Thank you!

    I suggest to install "El Capitan", a clean install, in this case, could be better

Maybe you are looking for

  • read sensors

    Hello I'll put in place an automatic gas detection system. So I need to get the data of two advanced type sensors Europe GmbH. company Gasmitter: S - AGM more 1032. My problem is that I don't know how to get the information from these sensors in my L

  • I want to help

    Hello im a fan of windows, and I have a few personal opinions of the new win10. I want to send you an email, and I couldn't find where to send them. can you tell me the windows e-mail address? I want to talk about my idea and I will support windows I

  • Virtual disk expansion

    I've added four new hard drives at 8 on my ax100 and configured ' DISK POOL 1, include 11 records. A drive is configured as a hot spare. Then, I have expanded the "Virtual Disk 1' to include all the"POOL1 DISC' again. I was expecting the SAN will app

  • How to clean the Surface mate?

    How to clean the matte surface of my Alienware 15? Whenever my hands sweat by practising a game, it loses its Matt effect. P.S. Please write about the products and services available in India.

  • How to analyze an XML using C++ or Cascades

    Hello I'm developing a simple application of the Listview, this need for an updated list with the response from the server in XML, the XML as below: Gambardella, Matthew XML Developer's Guide Computer 44.95 2000-10-01 An in-depth look at creating app