IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Image to blob

    Posted Wed March 12, 2014 09:21 AM

    Hi all,

    Currentely I’m working on a project to save data in a database along with a picture.

    My first idea was to convert the image to a byte array, and safe this in the database as a BLOB.
    But is this possible .?
    Because I can’t find a way to convert the Image to al byte array…
    (the image comes from the class CameraHandler from the function getCameraSnapshot())

    Or is there a better way to store the picture data.?

    Thanks in advance.

    Ken


    #webMethods-General
    #mobile
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Image to blob

    Posted Thu April 03, 2014 10:43 AM

    Hi Ken,

    Image.getRGB can be used to retrieve the raw pixel data from any Image. If you’re looking for a recognised image format representation, you can additionally use the runtime PngParser.pngCreateByteArray method to return you a byte array which is the image encoded into the PNG file format.

    Regards,

    Nick.
    (Mobile Designer Development Team)


    #mobile
    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Image to blob

    Posted Fri April 04, 2014 08:37 AM

    I have used base64Encode for REST intgeration with mobile app and IS.
    Was able to store in db and retrive data for any attachments and images.
    Not sure from mobile designer apis same can be achieved


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods
    #mobile