<?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 Inventor API Save as JPEG with Transparent Background in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/inventor-api-save-as-jpeg-with-transparent-background/m-p/9035718#M168309</link>
    <description>&lt;P&gt;I have been scouring the forum and API help section to see if there is a command similar to "SaveAsBitmapWithOptions" for JPEG, but haven't found anything.&amp;nbsp; What I want to be able to do is shown in the code, but I need to export to JPEG for my cloud database. I can change the file type to .JPG, but I lose the ability to make the background transparent. Is there a command to do this, or a workaround to convert the exported .BMP to .JPG?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Public Sub ExportToJPG()
    ' Get the active view.
    Dim oView As View
    Set oView = ThisApplication.ActiveView
    
 'Create a new NameValueMap Object
    Dim oOptions As NameValueMap
    Set oOptions = ThisApplication.TransientObjects.CreateNameValueMap '.TransientObjects.CreateNameValueMap
    
    oOptions.Value("TransparentBackground") = True

    Call oView.SaveAsBitmapWithOptions("C:\Temp\TestB.bmp", 200, 150, oOptions)
End Sub

&lt;/PRE&gt;</description>
    <pubDate>Thu, 19 Sep 2019 18:06:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-19T18:06:39Z</dc:date>
    <item>
      <title>Inventor API Save as JPEG with Transparent Background</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/inventor-api-save-as-jpeg-with-transparent-background/m-p/9035718#M168309</link>
      <description>&lt;P&gt;I have been scouring the forum and API help section to see if there is a command similar to "SaveAsBitmapWithOptions" for JPEG, but haven't found anything.&amp;nbsp; What I want to be able to do is shown in the code, but I need to export to JPEG for my cloud database. I can change the file type to .JPG, but I lose the ability to make the background transparent. Is there a command to do this, or a workaround to convert the exported .BMP to .JPG?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Public Sub ExportToJPG()
    ' Get the active view.
    Dim oView As View
    Set oView = ThisApplication.ActiveView
    
 'Create a new NameValueMap Object
    Dim oOptions As NameValueMap
    Set oOptions = ThisApplication.TransientObjects.CreateNameValueMap '.TransientObjects.CreateNameValueMap
    
    oOptions.Value("TransparentBackground") = True

    Call oView.SaveAsBitmapWithOptions("C:\Temp\TestB.bmp", 200, 150, oOptions)
End Sub

&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Sep 2019 18:06:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/inventor-api-save-as-jpeg-with-transparent-background/m-p/9035718#M168309</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-19T18:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor API Save as JPEG with Transparent Background</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/inventor-api-save-as-jpeg-with-transparent-background/m-p/9035736#M168310</link>
      <description>&lt;P&gt;JPEG files don't support transparent backgrounds..&lt;/P&gt;
&lt;P&gt;PNG will..&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 18:15:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/inventor-api-save-as-jpeg-with-transparent-background/m-p/9035736#M168310</guid>
      <dc:creator>mcgyvr</dc:creator>
      <dc:date>2019-09-19T18:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor API Save as JPEG with Transparent Background</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/inventor-api-save-as-jpeg-with-transparent-background/m-p/9035737#M168311</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Firstly API related questions are better handled&amp;nbsp; on the &lt;STRONG&gt;Inventor Customization forum&lt;/STRONG&gt;&amp;nbsp;:&lt;BR /&gt;&lt;A href="http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120" target="_blank"&gt;http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Secondly, I don't think JPG supports transparent backgrounds, so if you save a file that has a transparent background to JPG the transparency is lost and you just get a white background.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So would a JPG with a white back ground work?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 18:16:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/inventor-api-save-as-jpeg-with-transparent-background/m-p/9035737#M168311</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2019-09-19T18:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor API Save as JPEG with Transparent Background</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/inventor-api-save-as-jpeg-with-transparent-background/m-p/9035746#M168312</link>
      <description>&lt;P&gt;Didn't realize JPEG did not support transparent background.&amp;nbsp; .PNG will work for my application. Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 18:21:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/inventor-api-save-as-jpeg-with-transparent-background/m-p/9035746#M168312</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-19T18:21:41Z</dc:date>
    </item>
  </channel>
</rss>

