<?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: Cropping image using SAS code ?? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90211#M3333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What sort of KPI are you using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Jun 2013 10:50:47 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2013-06-09T10:50:47Z</dc:date>
    <item>
      <title>Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90204#M3326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have some images and I want to to crop those images so that I can use them to place on the same page . Reason to crop the image is to maintain the quality of the desired image so that I do not loose valuable space on the page while placing them on same page in PDF file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Original image is produced by PROC GKPI in HTML file then using PROC GSLIDE it is saved as png image then using PROC GREPLAY images are placed on the same page of the pdf .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to to follow above complex steps to combine four graphs produced by PROC GKPI as It seems that PROC GKPI does not produce images in catalog..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone solution or alternate way of doing the task ???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 15:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90204#M3326</guid>
      <dc:creator>ucvikas</dc:creator>
      <dc:date>2013-05-30T15:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90205#M3327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me re-state your question, just to make sure I understand what you're wanting...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want a programmatical way (in SAS) to get rid of the white-space around the Proc Gkpi gauges/etc output images, so that you can then annotate/greplay them tightly onto the same page without overlapping?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, if someone has an alternate way to create such a Gkpi dashboard, you'd also be receptive to that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 15:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90205#M3327</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-05-30T15:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90206#M3328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes . Exactly . &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 15:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90206#M3328</guid>
      <dc:creator>ucvikas</dc:creator>
      <dc:date>2013-05-30T15:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90207#M3329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the absence of any answers/suggestions, I think this might not be do-able.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might be a good thing to contact tech support about, and ask them to enter a request for adding functionality to Proc GKPI to allow the user to better control the white-space around them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 15:49:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90207#M3329</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-06-05T15:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90208#M3330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeh .. This may be good idea for future version of SAS but as a soulution I also do not see any better way out of it . Anyway I never knew that we can request SAS Support for improvements in existing PROCs (don't know whether it counts or not); but yes PROC GKPI despite being execellent procedure has little to offer me regarding control on graphs. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 07:20:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90208#M3330</guid>
      <dc:creator>ucvikas</dc:creator>
      <dc:date>2013-06-06T07:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90209#M3331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am looking forward to the solution of &lt;A href="http://www.rasteredge.com/how-to/csharp-imaging/crop-image/"&gt;image cropping c#&lt;/A&gt; idea, i found it is hard to get rid of the white space. the quality of images is important .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 08:22:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90209#M3331</guid>
      <dc:creator>drimage</dc:creator>
      <dc:date>2013-06-06T08:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90210#M3332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - I might have figured out a programmatical (in SAS) work-around for you ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather than annotating the gkpi image into a gslide within the xsys/ysys=3 0-100 coordinates, you can actually annotate the image *outside* of the visible 0-100 coordinates, thereby chopping (cropping) off the edges. ... Or, as I like to call it, literally "thinking outside the box" &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example where I chop off some of the left &amp;amp; right edges of a gkpi png, to get rid of some of the white space:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data anno_img;&lt;BR /&gt;length function $8;&lt;BR /&gt;xsys='3'; ysys='3';&lt;BR /&gt;x=-15; y=0; function='move'; output;&lt;BR /&gt;x=115; y=100; function='image'; imgpath='gkpi4.png'; style='fit'; output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goptions xpixels=300 ypixels=300;&lt;BR /&gt;proc gslide anno=anno_img;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm attaching the gkpi4.png image (that I used in the example code), if you want to use that to experiment with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="gkpi4.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/3655_gkpi4.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 12:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90210#M3332</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-06-06T12:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90211#M3333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What sort of KPI are you using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 10:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90211#M3333</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2013-06-09T10:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90212#M3334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been messing around with this, since I have a similar problem with the white spaces...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What solved it for me was just setting the "correct" goptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The line that worked for me came from this presentation: &lt;A href="http://www.sas.com/offices/NA/canada/downloads/presentations/TASS09/PROC-GKPI.pdf"&gt;http://www.sas.com/offices/NA/canada/downloads/presentations/TASS09/PROC-GKPI.pdf&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;It was: goptions reset=all rotate=landscape device=javaimg xpixels=240 ypixels=200;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This created a compact image without all the white space in my html file. If you change the pixels, it sometimes messes it up again (e.g. xpixels=480 ypixels=400 didn't work for me, but xpixels=320 ypixels=240 did work). I'm assuming the landscape view also has to do with this (i.e. I think SAS autofits the image in some strange way and you need to trick it into doing it in a nicer way).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2013 06:53:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90212#M3334</guid>
      <dc:creator>WDZ</dc:creator>
      <dc:date>2013-06-24T06:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90213#M3335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;never try to crop image with this kind of code before. i hope i can get the best size image. &lt;A href="http://www.rasteredge.com/how-to/vb-net-imaging/crop-image/"&gt;image cropping&lt;/A&gt; is useful but can i &lt;A href="http://www.rasteredge.com/how-to/vb-net-imaging/resize-image/"&gt;resize image&lt;/A&gt; with this code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 03:57:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90213#M3335</guid>
      <dc:creator>gfjump</dc:creator>
      <dc:date>2013-12-13T03:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cropping image using SAS code ??</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90214#M3336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, gfimage. &lt;/P&gt;&lt;P&gt;Thanks for your nice sharing. Here are some code about the related image resizing process:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="kwrd"&gt;Imports&lt;/SPAN&gt; System.Drawing&lt;/P&gt;&lt;P&gt;&lt;SPAN class="kwrd"&gt;Imports&lt;/SPAN&gt; System.Drawing.Imaging&lt;/P&gt;&lt;P&gt;&lt;SPAN class="kwrd"&gt;Imports&lt;/SPAN&gt; PQScan.PDFToImage&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="kwrd"&gt;Namespace&lt;/SPAN&gt; SpecifyImageSize&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN class="kwrd"&gt;Class&lt;/SPAN&gt; Program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="kwrd"&gt;Private&lt;/SPAN&gt; &lt;SPAN class="kwrd"&gt;Shared&lt;/SPAN&gt; &lt;SPAN class="kwrd"&gt;Sub&lt;/SPAN&gt; Main(args &lt;SPAN class="kwrd"&gt;As&lt;/SPAN&gt; &lt;SPAN class="kwrd"&gt;String&lt;/SPAN&gt;())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="rem"&gt;' Create an instance of PQScan.PDFToImage.PDFDocument object.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="kwrd"&gt;Dim&lt;/SPAN&gt; pdfDoc &lt;SPAN class="kwrd"&gt;As&lt;/SPAN&gt; &lt;SPAN class="kwrd"&gt;New&lt;/SPAN&gt; PDFDocument()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="rem"&gt;' Load PDF document.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; pdfDoc.LoadPDF(&lt;SPAN class="str"&gt;"sample.pdf"&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="rem"&gt;' Set dpi to render image&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; pdfDoc.DPI = 96&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="rem"&gt;'Get total page count.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="kwrd"&gt;Dim&lt;/SPAN&gt; count &lt;SPAN class="kwrd"&gt;As&lt;/SPAN&gt; &lt;SPAN class="kwrd"&gt;Integer&lt;/SPAN&gt; = pdfDoc.PageCount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="kwrd"&gt;For&lt;/SPAN&gt; i &lt;SPAN class="kwrd"&gt;As&lt;/SPAN&gt; &lt;SPAN class="kwrd"&gt;Integer&lt;/SPAN&gt; = 0 &lt;SPAN class="kwrd"&gt;To&lt;/SPAN&gt; count - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="rem"&gt;'Convert page to image in target size&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="kwrd"&gt;Dim&lt;/SPAN&gt; bmp &lt;SPAN class="kwrd"&gt;As&lt;/SPAN&gt; Bitmap = pdfDoc.ToImage(i, 100, 200)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="rem"&gt;'Save image &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bmp.Save(&lt;SPAN class="str"&gt;"output"&lt;/SPAN&gt; &amp;amp; i &amp;amp; &lt;SPAN class="str"&gt;".jpg"&lt;/SPAN&gt;, ImageFormat.Jpeg)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="kwrd"&gt;Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="kwrd"&gt;End&lt;/SPAN&gt; &lt;SPAN class="kwrd"&gt;Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN class="kwrd"&gt;End&lt;/SPAN&gt; &lt;SPAN class="kwrd"&gt;Class&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But I wonder how can I accomplish the &lt;A href="http://www.pqscan.com/convert-pdf/to-image-size-vb.html"&gt;image resizing process&lt;/A&gt;. Do I need another &lt;A href="http://www.pqscan.com/convert-pdf/to-image-size-csharp.html"&gt;image resizing SDK&lt;/A&gt; to help customize the size of images? I am almost a green hand here. Any suggestion will be appreciated. Thanks in advance.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Arron&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 07:46:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Cropping-image-using-SAS-code/m-p/90214#M3336</guid>
      <dc:creator>arronlee</dc:creator>
      <dc:date>2015-08-29T07:46:22Z</dc:date>
    </item>
  </channel>
</rss>

