<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to convert JPEG binary data into 8-bit/256-color Bitmap binary data in ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703804#M1671138</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, could you please give me the source code part where you convert the jpeg to bmp? &lt;/P&gt;&lt;P&gt;I need to convert a xml file intro bmp to load it to se78 programmatically. &lt;/P&gt;&lt;P&gt;I managed to convert the xml to binary using&amp;nbsp; SCMS_XSTRING_TO_BINARY FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2012 14:02:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-08-28T14:02:03Z</dc:date>
    <item>
      <title>How to convert JPEG binary data into 8-bit/256-color Bitmap binary data in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703800#M1671134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Hi ABAP Gurus -- &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: arial,helvetica,sans-serif;"&gt;The overview of the technical requirement:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Convert JPEG rawstring/binary data received from mobile devices (e.g. iPad photo) stored in a SAP z-table into BMP&amp;nbsp; (IGS is used for conversion)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Load the BMP in BDS programmatically&amp;nbsp; (modified se78 code is used here)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Call a Smartforms which will take in an internal table containing the BDS details of the images.&amp;nbsp; The smartform will display single image per page.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Convert the smartform into PDF and send it as an email attachment.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Everything is done programmatically.&amp;nbsp; No external/manual image conversion possible.&lt;/LI&gt;&lt;LI&gt;All logic is wrapped into an RFC function module which is used by the mobile device via SUP.&lt;/LI&gt;&lt;LI&gt;Client system is ECC 6&lt;/LI&gt;&lt;LI&gt;Adobe Document Services (ADS) is not available&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Bad image resolution from the 256-color bitmap on the forms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Findings from prior research work:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SAP has a limitation of 256 colors for BDS and Smartforms.&amp;nbsp; This results in some loss in image quality.&lt;/LI&gt;&lt;LI&gt;The IGS converter has a fixed color bit depth of 24bit for BMP/TIFF data&lt;/LI&gt;&lt;LI&gt;Image resolution is not a problem if the image is converted to 8-bit BMP via image conversion program (e.g. Paint) before loading it to BDS (se78).&amp;nbsp; Image on the form looks fine if this is done.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;There is minimal degradation to image quality if the image loaded to BDS has a bit depth of 8 (256 colors).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How to convert a JPEG binary data/rawstring (or BMP 24-bit) into an 8-bit BMP data in ABAP?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 10:06:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703800#M1671134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-17T10:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert JPEG binary data into 8-bit/256-color Bitmap binary data in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703801#M1671135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see anything in SAP that does this.&amp;nbsp; However, that's not to say that it cannot be done.&amp;nbsp; For instance, I have a program that reads in a binary file, like .xlsx or .mp3, and calls a web service, via proxy, with a method to convert xstring (created from my binary table upload) to a PDF, returning an xstring that I put back into a binary table (type table of tbl1024).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps that's an alternative that you could explore, if you have software accessible somewhere on the servers available by connection that will do the conversion.&amp;nbsp; I think that there should be software which you can get for server that will do the conversion for you, and give you the converted xstring or binary table back.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 20:15:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703801#M1671135</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-17T20:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert JPEG binary data into 8-bit/256-color Bitmap binary data in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703802#M1671136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved.&amp;nbsp; Thanks to Thomas Jung's article:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/people/thomas.jung/blog/2007/09/05/abap-bitmap-image-processing-class"&gt;http://scn.sap.com/people/thomas.jung/blog/2007/09/05/abap-bitmap-image-processing-class&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I reused the transform_grayscale method after converting the JPEG to BMP 24-bit via IGS class.&amp;nbsp; This method will result in an 8-bit BMP.&amp;nbsp; The BMP is then loaded to se78 programmatically and the resulting image resolution is just what we were looking for.&amp;nbsp; It appears just as good on the resulting PDF (from Smartforms).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 May 2012 11:42:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703802#M1671136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-19T11:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert JPEG binary data into 8-bit/256-color Bitmap binary data in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703803#M1671137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response, Break Point.&amp;nbsp; However, we are limited at what we can install in the system so we had to find ways around it within SAP.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 May 2012 11:43:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703803#M1671137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-19T11:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert JPEG binary data into 8-bit/256-color Bitmap binary data in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703804#M1671138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, could you please give me the source code part where you convert the jpeg to bmp? &lt;/P&gt;&lt;P&gt;I need to convert a xml file intro bmp to load it to se78 programmatically. &lt;/P&gt;&lt;P&gt;I managed to convert the xml to binary using&amp;nbsp; SCMS_XSTRING_TO_BINARY FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 14:02:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703804#M1671138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-28T14:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert JPEG binary data into 8-bit/256-color Bitmap binary data in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703805#M1671139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dennis Carpio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first of all thank you very much for this thread!&lt;/P&gt;&lt;P&gt;Do you mean with "reused" transform_grayscale that you modified this method to get a 8-bit Bitmap in color or your requirement is not to use colored graphics?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Manuel Nonnenmacher&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 08:59:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703805#M1671139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-09-21T08:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert JPEG binary data into 8-bit/256-color Bitmap binary data in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703806#M1671140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody, I know this post is very old but I need solve this issue too. Someone could publish or send me the source or the algorithm for reuse the grayscale method ?&lt;/P&gt;&lt;P&gt;Thank a lot!!&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 12:54:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703806#M1671140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-05T12:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert JPEG binary data into 8-bit/256-color Bitmap binary data in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703807#M1671141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code is present in Thomas Jung's blog. See the links at the bottom of blog.&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="44625" __jive_macro_name="blogpost" class="jive_macro jive_macro_blogpost" data-orig-content="ABAP Bitmap Image Processing Class" href="https://community.sap.com/" modifiedtitle="true" title="ABAP Bitmap Image Processing Class"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can install the code using &lt;A href="https://www.assembla.com/spaces/saplink/wiki" title="https://www.assembla.com/spaces/saplink/wiki"&gt;SAPlink Project&lt;/A&gt;. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:19:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-convert-jpeg-binary-data-into-8-bit-256-color-bitmap-binary-data-in/m-p/8703807#M1671141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-05T16:19:05Z</dc:date>
    </item>
  </channel>
</rss>

