<?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 ippiResizeSqrPixel not resizing correctly in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiResizeSqrPixel-not-resizing-correctly/m-p/831223#M5562</link>
    <description>Found my problem. I was using ippiResizeSqrPixel_8u_AC4R when I should have been using ippiResizeSqrPixel_8u_C4R.&lt;BR /&gt;&lt;BR /&gt;Sorry to have bothered anyone.&lt;BR /&gt;&lt;BR /&gt;Tom</description>
    <pubDate>Thu, 02 Sep 2010 15:38:44 GMT</pubDate>
    <dc:creator>photo_tom</dc:creator>
    <dc:date>2010-09-02T15:38:44Z</dc:date>
    <item>
      <title>ippiResizeSqrPixel not resizing correctly</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiResizeSqrPixel-not-resizing-correctly/m-p/831222#M5561</link>
      <description>This is my first application using the ippiResizeSqrPixel function and I'm have problems with it. &lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[cpp]SendCurrentImage( int pixelWidth, int pixelHeight, int imageSizeInBytes, const char* image )
{

	const int sizeOfBufferWindow = 2000000;
	int pixels = sizeOfBufferWindow/4;
	double shapeRatio = (double) pixelWidth / (double) pixelHeight;
	int newWidth = (int) sqrt((double)pixels * shapeRatio);
	int newHieght = pixels / newWidth;

	double scale =  (double) newWidth / (double) pixelWidth ;
	scale = min(1.0, scale);

	IppiRect sourceRoi = {0, 0, pixelWidth, pixelHeight};
	IppiRect destRoi = {0, 0, newWidth, newHieght};
	int bufSize;

	// calc required size of working buffer

	ippiResizeGetBufSize( sourceRoi, destRoi, 4, IPPI_INTER_CUBIC, &amp;amp;bufSize );
	Ipp8u* workingbuff = ippsMalloc_8u( bufSize);

	Ipp8u* destImageBuffer = reinterpret_cast&lt;IPP8U&gt; ( &amp;amp;_pData-&amp;gt;imageToGui.rawImage[0]);

	IppiSize sourceImageSize;
	sourceImageSize.height = pixelHeight;
	sourceImageSize.width = pixelWidth;

	IppStatus status = ippiResizeSqrPixel_8u_AC4R(reinterpret_cast&lt;CONST ipp8u=""&gt; (image), sourceImageSize, pixelWidth * 4, sourceRoi, 
		destImageBuffer, newWidth * 4,  destRoi ,scale, scale, 0.0, 0.0, IPPI_INTER_CUBIC, workingbuff);
	ippsFree( workingbuff);[/cpp]&lt;/CONST&gt;&lt;/IPP8U&gt;&lt;/PRE&gt; &lt;BR /&gt;&lt;BR /&gt;Test Condtions - XP32, VS2008, IPP6.1. Source Image is in RGB0 format and image is 6750 pixels wide by 1200 pixels high.  When called imageSizeinBytes = 32,400,000. The image is to be resized to 1677 pixels wide by 298 pixels high.&lt;BR /&gt;&lt;BR /&gt;To make things simple, I thought I would try to resize a simple image of a single color - "0xF6F7F800". What I'm getting back after resampling is "F7F80000", but on some I do get the correct value. Just to make things clear (for myself), when I look at the source image "0xF6F7F800", the stored bytes are: byte[0] = 00, byte[1] = 0xF8, byte[2] = F7, byte[3] = 0xF6; then repeats for rest of image.&lt;BR /&gt;&lt;BR /&gt;Suggestions?&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Sep 2010 14:32:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiResizeSqrPixel-not-resizing-correctly/m-p/831222#M5561</guid>
      <dc:creator>photo_tom</dc:creator>
      <dc:date>2010-09-01T14:32:57Z</dc:date>
    </item>
    <item>
      <title>ippiResizeSqrPixel not resizing correctly</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiResizeSqrPixel-not-resizing-correctly/m-p/831223#M5562</link>
      <description>Found my problem. I was using ippiResizeSqrPixel_8u_AC4R when I should have been using ippiResizeSqrPixel_8u_C4R.&lt;BR /&gt;&lt;BR /&gt;Sorry to have bothered anyone.&lt;BR /&gt;&lt;BR /&gt;Tom</description>
      <pubDate>Thu, 02 Sep 2010 15:38:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiResizeSqrPixel-not-resizing-correctly/m-p/831223#M5562</guid>
      <dc:creator>photo_tom</dc:creator>
      <dc:date>2010-09-02T15:38:44Z</dc:date>
    </item>
  </channel>
</rss>

