Help Storing Images in rms

Hola, Did someone get to stored sussecfully images in teh rms? I capture an image using MMAPI : snapshot() and i get a byte[] tyhat is waht I store in teh rms, but when open teh application again I get a error, I guess for the size of the picl, but I cvant choose the resoultion.l Actually teh pics are like 40 K and my applicatio is suppose to handle the capture and storage of 2 pics. OS i create a recolrd store recordPic= new byte[80000].
Any ideas?

You could also check whether this 10K for each picture is still working okay, by checking whether it is possible to save and reload a thumbnail of that picture.
You've already read the article at http://developers.sun.com/techtopics/mobility/midp/articles/picture/.
But it has a private method that can be used for testing a thumbnail and use that for saving in the rms. When you can read that image back again, then there's nothing wroing with how're you constructing the image. Then it's related to the image size.
See this method (copied from the article) and use it for creating a thumbnail:
  private Image createThumbnail(Image image) {
  int sourceWidth = image.getWidth();
  int sourceHeight = image.getHeight();
  int thumbWidth = 64;
  int thumbHeight = -1;
  if (thumbHeight == -1)
    thumbHeight = thumbWidth * sourceHeight / sourceWidth;
  Image thumb = Image.createImage(thumbWidth, thumbHeight);
  Graphics g = thumb.getGraphics();
  for (int y = 0; y < thumbHeight; y++) {
    for (int x = 0; x < thumbWidth; x++) {
      g.setClip(x, y, 1, 1);
      int dx = x * sourceWidth / thumbWidth;
      int dy = y * sourceHeight / thumbHeight;
      g.drawImage(image, x - dx, y - dy,
          Graphics.LEFT | Graphics.TOP);
  Image immutableThumb = Image.createImage(thumb);
  return immutableThumb;
}

Similar Messages

  • Storing image to rms as bytes

    hi, here imtrying to save image into rms and load the same from rms but i couldnt able to display the code
    size of byte im getting is 1
    import javax.microedition.rms.*;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.lcdui.*;
    import java.io.*;
    public class RMSImage extends MIDlet
    {Form frm=null;
      private Display display;
    RecordStore rs;
    public RMSImage(){
                        rs=null;
                        //      InputStream is=null;
                        display = Display.getDisplay(this);
    frm = new Form("Imageshow");
    public void startApp(){
    try{
              rs=RecordStore.openRecordStore("imagefile",true);
              System.out.println("record store created");
         catch(RecordStoreException r){r.printStackTrace();}
    save();
         display.setCurrent(frm);
    public void save(){
    // System.out.println(imgdata);
    try{
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(baos);
    byte data[]= null;
              try{
                        System.out.println("hi");
                   DataInputStream dis = new DataInputStream(this.getClass().getResourceAsStream("/Duke.png"));
         System.out.println("check for image length");
         /* for(int j=0;j<3524;j++){ System.out.println("loop entering");data[j] = dis.readByte();System.out.println(data.length);
              System.out.println("datalength"+data.length);
              for (int i = 0; i < data.length; i++)
              dos.writeByte(dis.readByte());
              catch(Exception e){System.out.println(e);}
    //System.out.println(imgdata);
    int x=baos.toByteArray().length;
    int r=rs.addRecord(baos.toByteArray(),0,baos.toByteArray().length);
    System.out.println("length is"+x);
    load(r);
    catch(RecordStoreNotFoundException rsnfe){}
    catch(RecordStoreException rse){}
    catch(Exception ioe){}
    System.out.println("sucess");
    public void load(int i){
    try{
    byte data[]=rs.getRecord(i);
    System.out.println(data.length);
    Image.createImage(data,0,data.length);
    }catch(RecordStoreException e){}
    public void pauseApp(){}
    public void destroyApp(boolean flag){
    //System.out.println(save());
    }

    i kept that in for loop
    even then i cudnt get the image n length same as i mentioned in the loop
    response------>
    Project "saveimage" loaded
    Project settings saved
    Building "saveimage"
    Build complete
    Running with storage root DefaultColorPhone
    record store created
    hi
    check for image length
    java.io.EOFException
    length is2869
    2869
    sucess
    Execution completed.
    955248 bytecodes executed
    28 thread switches
    742 classes in the system (including system classes)
    3980 dynamic objects allocated (134324 bytes)
    2 garbage collections (90936 bytes collected)
    But actual length is 3524 but length displayed is another
    more over if i need multiple images to store what shal i do then
    Edited by: lakshmi on Oct 25, 2007 2:43 AM

  • Blob Problem (storing Images)

    AOA!
    I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
    SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
    It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
    The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
    Please help us in this regard. We will be thankfull to you.
    Usman Rana
    Dont reply to above mantioned email my actual email account is [email protected]

    I think that both your SQL is wrong and your intended use is wrong. According to the SQL reference, the following seems to be a simplified definition that seems to match what you're trying to do. UPDATE &lt;table&gt; SET &lt;column&gt; = &lt;expr&gt;. So PROPERTIES should be a &lt;table&gt; of some kind and X should be a &lt;column&gt; of that table. This changes your PreparedStatement to *"UPDATE PROPERTIES SET X = ? WHERE NAME = ?"* Then you can do ps.setBlob(1, b) and ps.setString(2, ...). Because your statement is DML you must do ps.executeUpdate(). So your code might look something like this.
    Blob b = ...;
    String x = ...;
    ps = c.prepareStatement("UPDATE PROPERTIES SET X = ? WHERE NAME = ?");
    ps.setBlob(1, b);
    ps.setString(2, x);
    int i = ps.executeUpdate();
    The executeUpdate() returns the row count (i.e. number of rows) of your DML statement. Try that and see if it helps.

  • Storing Images In Oracle 9.2 Using Forms 6i

    When my database was 8.1.7, storing Images in the database in BLOB field worked fine through Form 6i. But when the database was upgraded to 9.2 then the images are not loaded in the database through Forms 6i.
    Kindly help
    Thanks

    Hi,
    I wanted to do the same thing and faced the same problem. I'm working on Forms 6i and Oracle 9i as backend.
    When an Image item is created on forms, it's datatype is set to Long Raw. You can see this by changing the type of the image item to text item. You'll see that the datatype is Long Raw. The idea of inserting the image would work perfectly if you set the datatype of the column to Long Raw in the backend.
    For using BLOB... I searched alot but all in vain. No answer as to how to handle BLOB in Forms 6i.
    Do let me know if you get a way out.

  • Storing images to persistent storage

    Hi all
    Does anyone know a good tutorial for storing images to persistent storage?
    I am comfortable in the process of storing items such as int and string etc.
    writeUTF ()
    readUTF()
    etc...But i cannot see how to store an image? and the inverse how to load the image back up.
    Mainly my lack of knowledge hinges on the fact that I do not know how to convert an Image to a byte array and make an image from a byte array?
    Then using this byte array what methods I uses from the DataOutputStream and DataInputStream for population?
    If anyone knows or can help would be very grateful?
    jimbobegg

    For anyone concerned heres a solution I used in its own class:
    public static void convertImageAndStore( Image photo, DataOutputStream daos )
         int imageWidth, imageHeight;
         imageWidth = photo.getWidth();
         imageHeight = photo.getHeight();
         int[] imgRgbData = new int[ imageWidth * imageHeight ];
         try
              photo.getRGB(imgRgbData, 0, imageWidth, 0, 0, imageWidth, imageHeight );
              //Start to write the different parts to the
              //DataOutputStream
              daos.writeInt( imageWidth );
                    daos.writeInt( imageHeight );
                    daos.writeInt( imgRgbData.length );
                    //Serialize image and store
                    //Serialize the image raw data
                    for (int i=0; i<imgRgbData.length; i++)
                        daos.writeInt(imgRgbData);
         catch( Exception exc )
              System.err.println( "Exception thrown by Utility::convertImageAndStore()");

  • Folder for stored images (Portalheader)

    Hello experts,
    could anyone let me know where I can find all the uploaded images for the Portalheader(Masthead). Where can I find the folder who is ressponsible for the administration of the images/background images??
    Thank you
    Regards
    Marco

    Hi Marco,
    You can find those uploaded image files in KM. KM is like your file server but is within the Portal that you can use to manage your files/content/data. Files, content or data exist in KM can be index and search via the Portal TREX (Search Engine).
    SAP NetWeaver Training Overview - SAP Knowledge Management (KM)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/06fac090-0201-0010-af9c-b67d14558014
    1) Storing images in Portal
    Storing images in Portal
    2) Simple static web pages and images? Store/refernence in KM?
    /thread/378997 [original link is broken]
    3) Upload Image to KM Repository
    /thread/26834 [original link is broken]
    4) showing image located in km folder
    showing image located in km folder
    Hope that helps.
    Ray

  • Displaying server stored images in an air application

    Usually when I go about displaying server stored images in a regular flex application I go about it the following way:-
    - Create a mysql database table on a server which contains image names
    - Create a php file which generates all of the image namesfrom the table as xml and upload this file to the server
    - Create a new flex application/project
    - In the application make a http service which points to my php/xml file and turns this data into an array collection
    - Set the array collection to the dataprovider of a tilelist component so that all of the images will eventually be displayed within it when they are created
    - I set the itemrenderer of the tilelist to an image component which has it's source set to something like source="{'assets/images'+ data.imagename}" with imagename being the field containing the name of the image which is stored in the mysql database table.
    - Make a folder in the app/project called assets/images which will contain all of the images
    - Upload the app to the server and once it runs all the images will be displayed in the application
    - Then any images that are uploaded to the server can also be displayed as long as their names are added to the mysql database
    My question is though how do you get server stored images to display within an Air Application? My air app will be used on multiple machines but I want the images in it to be dynamic i.e. stored on a server and can be changed. How can this be done?

    I'm struggling to figure out how to access the image files when the assets/images folder will be on a server and the app itself will be on the user's desktop whereas usually in the case of a regular flex app this wouldn't mater as both the app and the image files would be on the server together. Is what I'm trying to do possible i.e. displaying images on a desktop air app straight from a server?

  • Help with images.....pliiiizzzzzz

    Im new to java and need help inserting images on a GUI! Does anyone have any programs or snippets of code that've done this successfully - preferrably using the GridBagLayout as well as in swing? If you have anything that works well, feel free to send me the entire java file ([email protected]) or just post it!

    Just create a JLabel with an image icon and you are able to display any JPEG and GIF image. You might take a look at the following:
    http://java.sun.com/docs/books/tutorial/uiswing/components/label.html
    Hope this helps,
    Pierre

  • How to read the stored images

    hi
    i have images in my table img,
    i want to know how toretreive that stored image

    i have images in my table img
    > i want to know how toretreive that stored image
    How to retrieve it depends on how it is stored? What is the data type? Is it perhaps a blob (large object in binary format)? If so check out the package dbms_lob and read Application Developer's Guide - Large Objects. If not connect to your database using sql plus to publish the data type for the image column from the command "describe img".

  • TS1314 Need help tranfering images to iphone...

    I need help tranfering images from my computer to my iphone. I've synced the images but they don't appear on my iphone, also on the file that contains the images, there's a file that says IPOD PHOTO CACHE. I don't know what to do. Please Help...

    Hope these help, do you not find them at all in the photos app?:
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPhoto '11: View photos or slideshows on iPod, iPhone, iPad, or Apple TV
    http://support.apple.com/kb/PH2437
    iTunes: Understanding the iPod Photo Cache folder
    http://support.apple.com/kb/TS1314
    ============================
    - Oz

  • Which is better datatype for storing Images in 11gr2 Database ?

    Can anyone tell me which datatype should be maintained for storing images in database in terms of
    1. Space
    2. Speed.
    And, Is there another way for storing images instead of database ?
    Thanks/Regards in advacne.

    982164 wrote:
    Which one have better speed, database system or file system ?Database is better all around. It is not just a question of speed. It is a question of storage, security, flexibility, scalability, robustness and so on.
    If you use ASM and raw devices from a storage array or SAN, how do you get o/s files onto that? (requires a file system on the SAN/array LUNs)
    If it is inside the database, database security, concurrency and consistency apply to the image. Outside the database? How do you control who has access? Prevent someone with slippery fingers from accidentally deleting/renaming/moving images files? How do you backup up the image data with the image attribute data in the database?
    Having all this inside the database, part of the database, managed by the database, provides you with more flexibility, robustness, and security. After all a RDBMS is a data management system - it is designed for managing data. And that includes managing binary data.
    As for speed. Reading a 24MB image is reading 24MB worth of data. Whether that data is read by process A from disk1, or process B from disk2 - the amount of data is the same. So if you want faster I/O, then use faster disks. If disk1 is faster, process A will perform better reading the image than process B. If disk2 is faster, the roles are reversed.
    So I/O speed is not a direct function of process A or process B. It is a direct function of the I/O storage and fabric layer. Yes, a process's method of I/O can make a difference (e.g. using block reads not aligned with the physical blocks on disk). But this is more a configuration issue than process doing badly designed I/O calls.
    So the speed question is a bit loaded as it has more to do with the architecture and design of the I/O system - and less to do with the process doing that I/O. You can have a highly optimised I/O process doing poorly using an old and slow I/O layer, and poorly written I/O process doing pretty well on a SSD I/O layer.
    Databases like Oracle is designed for dealing with data - and thus effectively dealing with I/O. Lots of it. For lots of data. So I/O process design is not a consideration. The database processes will use the I/O layer as optimally as possible and as configured.

  • Help with image ready on ps3 extended

    I am pretty new to photo shop and have cs3 extended.
    I have a Yorkie website where I cut out my Yorkies and paste them to differnet backgrounds.... a lady that does the ANIMATED pictures  HAS DID A COUPLE FOR ME ....BUT I NEED TO LEARN TO DO THIS MYSELF.  She will not tell folks how to do:)
    The problem is once you work with a pic that is animated already then try to  add a dog.....by pasting....it removes the animation in the background pic.... and the picture no longer moves once the dog is added ?....She said she puts thru IMAGE READY...which I do not see anywhere on CS3 extended.  I will try to insert a pic she did for me and any help would be greatly appreciated....as I can do but then the picture is no longer animated once altered in my photoshop but she is doing somehow.....so has to be poss ?  If I were to do this pic it would stop moving once the dogs were added....plus not as good as her but practicing........could it be the fact she is doing in layers and I am doing copy and paste...I do know she puts thru Image ready and I do not know where this is located on cs3 extended or how to do?
    am

    well...........l when I try to open Gif with the import and chose the video frames to layers...am getting a message saying I need Quicktime 7.1 to be able to do??? and when selecting import that is the only option I have to open my animated picture?...YOU HAVE BEEN SO MUCH HELP!   THANK YOU SO MUCH...! 
       BLUE MONDAY EXCLUSIVES   
    Date: Sat, 17 Apr 2010 20:23:27 -0600
    From: [email protected]
    To: [email protected]
    Subject: Re: Help with image ready on ps3 extended
    I'm not sure anyone mentioned this but if not to open GIFs using the import you have to enter the GIF name as GIF isn't listed as one of the options.
    It sounds like you are viewing the images in a maximized screen mode. To view more than one document, press F to cycle through the screen modes. FYI, only the contents of the currently selected document can be viewed in the layers palette.
    I'll just talk about copy/paste so as not to confuse...
    If you are going to copy/paste, click the frame around the dog document to target it. Your layers palette will now contain the contents of the dog document. Click on the layer in the layers palette with the selected dog over transparency. With that layer highlighted in your layers palette, press Ctrl A; then Ctrl C. (Select<Select All; Edit<copy if you prefer using the menu.) This will copy that layer into your clipboard.
    Next, click the frame of the document containing the animation. Click the topmost layer in the layers palette because we want you dog to be in the top layer. Press Ctrl + V. (Edit<Paste if you prefer using the menu).
    Your dog is most likely going to be too big. Use Edit<Free Transform to size and move the dog to the desired location.
    At this point, your dog should be showing in each frame in the animation palette.
    Example:
    http://forums.adobe.com/servlet/JiveServlet/downloadImage/25315/with-palettes-open.jpg
    I'm using the older Image Ready me method. The highlighted place in the palette is where you switch methods between the old method and the new timeline. Notice, I have the layers and animation palette both in the workspace...and I'm not in a maximized mode. The red arrow shows the correlation between the frame and the layer represented by it in the layers palette.
    Image:second-image.jpg
    Here I have a second image to slip into my animation. I have the creature selected and on it's own layer with transparency around it. Notice that the the layer with the isolated creature is highlighted. At this stage, I'll press Ctrl + A; then Ctrl + C to select and save this image to my clipboard.
    Image:creature-added.jpg
    Here, I've pasted (Ctrl + V or Edit<Paste) in my creature and resized it (Ctrl + T or Edit<free transform) so he can be jumped. I also added a shadow under my creature which I added to a layer under my creature. Notice that when Frame on is selected in the animation palette that the eye is on both the creature and the shadow. If I click the eye to turn them (creature and shadow layer) off, they disappear from the entire animation. I can make them appear at any frame by clicking the desired frame in the animation then turning on the eye icon for the creature and shadow layer in the layers palette. I can also adjust opacity if desired.
    You could even more than the one image if you want the dog to appear to move. Use the eyeball visibility to determine which pose will be used for that frame.
    Example:
    Image:jump-creature-gif.gif
    Here, I used transform warp to adjust the pose of the creature for a few frames as he's jumping the creature...just for fun.
    >

  • Help my image library is now showing errors

    I have Lightroom 5 and have just upgrade with the latest updates. Now all the unkeyworded images have an error notice on them. How do I restore them to were there were yesterday? it looks like they are now only thumbnails as they are very pixelated. There is now image metadata showing at the side of the image either.
    Any suggestions please?

    Hi Keith,
    if I view the library in the grid there is an ! mark next to every photo that I haven't given keywords to yet but if i view them in the Loupe window it has a label above which says There was an error working with the photo. There is no metadata showing next to it. The only thing I have done in the last few days to the computer is to run updates on my operating system. Actually Lightroom isn't then only thing not working, my accounting programme won't work at all now!
    I am new to lightroom so not 100% sure what I am doing, any insight would be welcome.
    Thanks
    Date: Thu, 24 Oct 2013 04:06:21 -0700
    From: [email protected]
    To: [email protected]
    Subject: Help my image library is now showing errors
        Re: Help my image library is now showing errors
        created by Keith_Reeder in Photoshop Lightroom - View the full discussion
    What do you mean by "error notice"?
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5784643#5784643
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5784643#5784643
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5784643#5784643. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Photoshop Lightroom at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Help: Storing and Calling images in Oracle7

    How we can store and call images in the oracle7 database using forms5.0 over windows.....
    Thanks in advance....

    Create a long raw column in your table.
    Base a default block on that table.
    Use the READ_IMAGE_FILE built in.

  • Scripting help for image pop-up within a PDF

    Hi,
    I'm creating some sample eBooks in Acrobat Professional 9 (Mac), and I am stuck on one element that needs to be present. In the text within the PDF, there might be a phrase like, "See Fig. 1". Fig. 1 might not be on that page, however. I know how to create a link in a PDF that will navigate the reader to the page with the image referenced, but that's not good enough. I'd like to have this happen:
    User clicks on "See Fig. 1".
    Popup window appears with the referenced thumbnail image.
    The image's popup window will stay on-screen until dismissed by the user.
    Clicking on the popup thumbnail image calls up a full-size image.
    The added wrinkles are many after we figure out the scripting for the above, but here are two major ones to be addressed right away:
    1) The images are already part of the typeset document converted to PDF, so I am guessing the images would have to be bundled with the PDF somehow. Our users need to use the PDFs in an offline environment, so a call-out to a URL is out of the question.
    2) The PDFs will be read on Macs, PCs, and possibly iPads. If a bundled, local file is called out when a user clicks on "See Fig. 1", how do I set a relative filepath in the call-out?
    Thanks for any help you can provide.
    Andrew

    Here's a sample document that demonstrates some of what you're asking about: https://acrobat.com/#d=aP-2xL45pM57xVkT6d6fSg
    The images are stored in buttons, so there is no concern about having to use external images. Note that this may not work on an iPad since most (all?) PDF viewers on the iPad do not have JavaScript support.

Maybe you are looking for