Reading JPEG picture attributes in ABAP

Dear gurus,
We're contemplating building a simple little picture repository in ABAP. Uploading and storing the data as binary strings is easy, but it would be quite neat to be able to verify at least a couple of things on the provided data, like the actual file type, which should be JPEG (don't want people to upload just anything with a .jpg file extension), and the picture resolution in pixels.
Is anybody aware of ABAP functionality that could achieve this?
Alternatively, all our users have (or should have) MS Office Picture Manager installed on their front-ends; would you know of a way to use this or another program to verify file type and resolution? Like calling an API of such a program, passing to it the file as a binary string and getting back some attributes?
And then, just in case somebody knows... I found this wonderful [how-to guide|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10ab79a4-1fc2-2b10-29bb-ef9ff6771e72] for a cropper/resizer application for Java; would anybody have an idea if such a thing is possible in ABAP?
Thx for all and any help and inspiration
Rainer

Actually I thought you could use it to try a conversion from JPG to BMP which the class handles, to check if it is indeed a JPG file (I suppose the conversion fails if it's not).
But I can't help you on the resize thing.
Another idea, maybe you could use something external as a Java applet embedded in a BSP?
For example this one: http://www.izhuk.com/imaging/
I guess you can adapt as well the document you posted to work on BSP instead of JSP (it would be a great deal of work though).
Hope it helps.
Edited by: Alejandro Bindi on Mar 30, 2009 8:18 PM

Similar Messages

  • Read Context  Node/Attribute option in webdynpro code wizard not available

    Hi Expets,
    I am new to webdynpro Abap, i have developed a small application to set default values for two fields. i want to use code wizard to implement the code. When i click on code wizard icon  in application tool bar, i have found lot of option like Method call in current controller, method call in used controller, Instantiate used component ... etc. But i didn't find the option Read Context Node/Attribute. Do i need to do any settings to get that. Kindly suggest. Your help will be greatly appreciated.
    Venkat

    Hi,
    Check the NW release,
    I checked with NW 7.02 - 2 tabs were available.
    with NW 7 - only 1 tab was available which you mentioned.
    Additional tab (Context ) might have been added after NW release 7.0.
    Regards
    Manas Dua

  • HT201317 Has anybody an idea, why my jpeg-picture uploaded to Photo Stream does not appear on my S4 like all the other pictures before? Ok, it's 4 years old, but JPEG and taken with a digital camera...! I'm despaired after trying since days...! Thank you!

    Has anybody any idea, why my jpeg-picture upoaded to Photo Stream does not appear on my iPhone S4 like all the other pictures before?
    Ok, it's a 4 year old picture, but taken with a digital camera as jpeg...! This cannot be the problem really, but I'm despaired after trying since days...! Thank you all for any hint you've got for me!

    If you asking me, I would suggest to additonally use a second storage service which also allows you to store your pictures over the 30 days period. I personally use Dropbox with automatic upload for that (https://db.tt/cMEgDUFZ), but there are also other storage services like Flickr for example.

  • Diaplay BLOB content (jpeg picture) in XML Publisher 5.6.3

    Hi Gurus,
    I am trying to include BLOB content (jpeg picture) in my RTF template.
    But the pdf output giving blank page.
    I am using following syntax in my picture form field.
    <fo:instream-foreign-object content-type="image/jpg" width="251.8pt"
    height="174.3pt">
    <xsl:value-of select="FILE_DATA"/>
    </fo:instream-foreign-object>
    Can you please correct me where I am doing wrong..?
    Many Thanks..!

    Hello Friends,
    Can anyone help me to resolve this issue please..!
    Below is the error from OPP service log.
    [6/14/10 3:33:34 PM] [UNEXPECTED] [54042:RT1236433] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.charAt(String.java:687)
         at oracle.apps.xdo.common.encoding.Base64Util.decode(Base64Util.java:54)
         at oracle.apps.xdo.template.fo.elements.FOInstreamForeignObject.end(FOInstreamForeignObject.java:71)
         at oracle.apps.xdo.template.fo.FOHandler.endElement(FOHandler.java:455)
         at oracle.apps.xdo.common.xml.XSLTHandler$EEEntry.sendEvent(XSLTHandler.java:594)
         at oracle.apps.xdo.common.xml.XSLTMerger.startElement(XSLTMerger.java:51)
         at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:206)
         at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:320)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1051)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5936)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3459)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3548)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:296)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:173)
    [6/14/10 3:33:34 PM] [54042:RT1236433] Completed post-processing actions for request 1236433.
    Many Thanks..!

  • 'Read JPEG File.vi' does not seem to work on PXI with real-time OS

    I am trying to read a jpeg file on a PXI system with LabVIEW real-time on it. To test I created a very simple VI (attached) with only 4 objects: 'Path' --> 'Read JPEG File.vi' --> 'Draw Flattened Pixmap.vi' --> 'Picture'.
    This VI works fine on my Windows XP host machine, but it does not work on the PXI system. The error code 1 occurs in 'Read JPEG File.vi'.
    The jpeg picture is in the same directory as the VI. I don't think I got the path or filename wrong because if I change the file or path name I get another error: 7: 'File/Directory Info in Check Path.vi->Read JPEG File.vi->test.vi'.
    Maybe reading jpeg files is not supported on realtime systems? I could not find anything about it. Sol
    utions or workarounds are of course welcome!
    Attachments:
    Test_Read_JPEG.vi ‏23 KB

    'Read JPEG File.vi' is not supported on LabVIEW RT. I believe it has to do with special functions or libraries need to be called due to the JPEG image type. Instead you can use a Bitmap and the 'Read BMP File.vi', which I believe is completely implemented in G code.
    Keep in mind that the RT System doesn't really have a front panel and that the front panel is only 'available' when LabVIEW is connected to the target such as being targeted or having a remote panel to it. Generally, a deployed RT system doesn't have a UI and just communicates to a Host VI which acts as the UI. Having said that, the BMP file worked when I tested.
    Regards,
    JR A.

  • How to catch a jpeg picture sent through a socket?

    A jpeg picture is beaming back to my java code through
    a socket connection, how can I get the picture? What
    code shall I use. Thank you.

    Thank you for the response. I tried, and my code below did now
    work. It seems that the read() did not read the next byte. ANy
    ideas?
    FileInputStream fin = new FileInputStream("test2.jpg");
    do {
    imageData[i] = (byte)fin.read();
    i++;
    if (i%2000 == 0) {
    loadStatus.setText(""+i+" "+imageData);
    }while(imageData[i]>=0 && i<19998);
    fin.close();
    imageData[i] = -1;
    //create the image
    image = Toolkit.getDefaultToolkit().createImage(imageData);

  • Custom user attribute from ABAP to Portal UME

    Hi All,
    We have choose the ABAP as the data source for portal UME. We have a custom user attribute in the abap. Now i want to bring that custom user attribute from abap to custom user attribute in the UME.
    Any help will be rewarded.
    Thanks
    Sarang.

    Any resolution to this issue?

  • Resize jpeg picture file.

    Hi
    How do i resize a jpeg picture (*.jpg) and save it in labview.?
    eg. from 800x600 to 640x480.
    thanks
    Per

    If you can get by with decimation, the answer is simple.
    Anthony de Vries on 8/16/2001 answered this question.
    He basically unflattened the flattened image out of the "Read JPEG" and then removed rows and columns from the pixmap matrix to shrink the image. If your JPEG must be arbitrarily scaled (i.e. can't be a 1:2, 1:3, 1:4, etc. decimation), you will have to do as IreneHe suggested and interpolate the values to match "fractional indices" of the new array. You should be able to use the array functions to do this.
    After you decimate your pixmap matrix, send it through the flatten function and draw the flattened pixmap to your picture indicator.
    I'm sorry I don't have exact function names. I am away from my LabVIEW machine at the moment.
    jc
    Mac 10.4
    LV7.1
    CLD

  • Cannot send jpeg pictures to my Motorola cell phone

    I cannot seem to get my MacBook Pro to send jpeg pictures to my cell phone (Verizon/Motorola). I can send jpeg pictures from the phone to the computer. When I attempts to send the file to the phone, all things connect and the phone asks if I want to accept the file, then the MacBook delivers a message: cannot send file: Internal Error. Any ideas???

    FYI: I figured it out. The jpeg files were too large to send to the phone. Exporting pictures from iPhoto (file>export) allows you to select a file type (jpeg for phone) an image quality, and a picture size. Once the photo is exported, bluetooth can send it to the phone without problems.

  • Overriding attributes in ABAP objects

    Hello,
    I currently want know if it is possible to override attributes in ABAP objects. i know it is possible with methods. I have extend a previous class functionality and want to change the refrence type of an attribute from the parent class, but only on the child. Is this possible in ABAP object or even in normal object oriented techniques.
    Thanks
    Brendan

    Hi,
    ususally you can achive this with other technics. You can e.g. use the class hierarchy for this:
    The attribute is of type REF_SUPERCLASS. Within the superclass it should be working when you set subclasses of REF_SUPERCLASS as attribute.
    Another way is to use interfaces as reference type for your attribute.
    Please refer to [ABAP Objects|http://help.sap.com/saphelp_nw70/helpdata/EN/ce/b518b6513611d194a50000e8353423/frameset.htm]. Especially the chapters about Inheritance and Interfaces.
    Regards Rudi

  • Function modules in CRM (read Business Partner attributes)

    Hi,
    I would like to print a document in wich will be Business Partner attributes and other crmdata. Does anybody know how I can read the Business Partner marketing attributes. Can I use for this some function modules or else?
    Are there some documentations about all Function modules in CRM and what they do?
    Thanks,
    Malnor

    Hi Malnor,
    Marketing attributes of a BP can be found in table AUSP.
    You can build your own custom function module to read marketing attributes.
    Refer to the link below for sample code of a FM to read BP marketing attributes -
    [Custom Function module to read BP marketing attributes|http://divulgesap.com/blog.php?p=NDg=]
    Hope it helps.
    Regards,
    Ravi

  • Reading .jpeg files in FILE or FTP adapter

    Hii
    I have to send .jpeg files at regular intervals using BPEL.
    I read about Base64 data type. I tried to create File Adapter and FTP adapter. I specified the folder location and *.jpeg as file pattern. I have made schema to opaque.
    But neither File or FTP adatper are picking up the file from specified directory. As per my plan, once I will get Opaque schema in BPEL, I will use Base64 encoding to get the data as string and to pass it to the endpoints.
    Any idea what I need to do in order to read .jpeg files.
    Any help is highly appreciated.

    Thanks for the help. Actually, I am following the similar process as given in "Tutorial 11 : File DB Integrations – Handling of opaque data types".
    I'm using SOA Suite 10.1.3.3; the .jpeg file is being picked up by the File Adapter, but failing to create BPEL instance with the following log details :
    +"<2009-03-06 17:02:13,053> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "cube delivery": [com.collaxa.cube.engine.delivery.CorrelationResolutionException: Correlation definition not registered.+
    +The correlation set definition for operation "ReadJPEGOp", process "SyncBase64BPELProcess", has not been registered with the process domain.+
    +Please try to redeploy your process to the process domain.+
    +]+
    +ORABPEL-03802+
    +Correlation definition not registered.+
    +The correlation set definition for operation "ReadJPEGOp", process "SyncBase64BPELProcess", has not been registered with the process domain.+
    +Please try to redeploy your process to the process domain."+
    I have deployed the process multiple times on two different SOA Suite Server 10133, but getting the similar logs. The file is being picked up but not generating BPEL instance.
    Any idea ???

  • Some documents to read as a starter in abap objects.

    Hi All,
    Need a help, I have read the basic concepts in ABAP objects, uptil cath try....... and event handling.
    However once this basoc reading is over, suggest me some additional links to read from, i wanna read more and learn since in my company there isnt much of exposure to object oriented concept in ABAP.

    Hello anu,
    Check out these links
    www.amazon.com/ABAP-Objects-Introduction-Programming-Applications/dp/0201750805
    www.amazon.com/ABAP-Objects-Reference-Horst-Keller/dp/1592290116
    searchsap.techtarget.com/sDefinition/0,,sid21_gci877494,00.html
    help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    www.erpgenie.com/abap/index.htm
    en.wikipedia.org/wiki/ABAP
    www.sappressbooks.com/downloads/h958_preview.pdf
    <b>Reward points if helpful    :-)</b>
    Thanks,
    Sachin

  • Camera/jpeg picture number not shown in Photos ?

    Hi  In iPhotos the JPEG picture number was shown but cannot find this in Photos, has it been removed ?

    There's an Automator workflow application that user léonie has posted that will put the file name into the Title field for any selected photos when it's run.  It's in this user tip: Photos for Mac: Batch Changing the Titles to the Filename

  • READ JPEG FILE.VI

    Hi,
    I am using Read JPEG File.vi to read the image file. The VI behaves differently when I login into my system (windows XP) as user and differently when I login as Administrator. When I login as user and provide the path of the jpeg file (70kb) it trough’s an error code 1.where as same thing works fine when I login as Administrator. For small Jpeg files (3-20kb) it works fine in both the login as. I am attaching the VI and the some jpeg files for your reference. Any suggestions would be greatly appreciated!
    Regards,
    Sathyendra N
    Attachments:
    code&jpg.zip ‏196 KB

    Hello Sathyendra,
    I ran your VI and could read your images without any error... the images seem not to be locked for any kind of account (user, admin, etc...) so I don't know what's wrong.
    Have you tried to use the "file info" function instead of "read jpg" ?
    Try to run this VI and see what happens, maybe resetting access right would help...
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    file.vi ‏33 KB

Maybe you are looking for

  • Maintain the current row position of a table after refresh.

    Hi, I use a poll to refresh tables continuously. when a table is refreshed, the current referring row is reset. To maintain the current row position after a refresh I use the following poll method. public void refreshTableT1(PollEvent pollEvent) { Fa

  • PB Calendar displays in Month only

    I've been using my Playbook for a few weeks without issue.  A few days ago my Calandar (which uses BlackBerry Bridge) stopped displaying any entries in the Day and Week mode.  I can still see the entries on my BB (Tourch) and in the PB Calendar when

  • How can I download a full installer for Yosemite?

    I updated to the latest version of Yosemite from App Store/Updates but I would like to have a full installer available on my system "just in case." However, when I go select OS X Yosemite from the Featured section and click Download all I see is a sp

  • I book g4 is in dire help

    so i got an i book from a friend but they have erased all the dock apps and i cannot open any apps someone please help!!!

  • How to access variable values across mappings?

    Hi all, I have created the following sample class Test.java and imported it as an archive: public class Test{ public static String myStringData = null; In one of the mappings, I have a UDF that sets the  "myStringData" using the foll: Test.myStringDa