Dear friends
i am using intel image processing library to rotate my image. if the image width is divesible by 8 , my image rotates fine. Otherwise i see garbage after rotation.i am using following code for this purpose. How can i get rid of it.
jcprops.JPGFile =ofn.lpstrFile;
if (ijlRead(&jcprops, IJL_JFILE_READPARAMS) != IJL_OK)
{
ijlFree(&jcprops);
return(FALSE);
}
img1 = CreateImageHeaderFromIJL(&jcprops,NULL);
iplAllocateImage(img1,0,0);
img = CreateImageHeaderFromIJL(&jcprops,NULL);
iplAllocateImage(img,0,0);
jcprops.DIBBytes = (BYTE*)img1->imageData;
jcprops.DIBWidth = wt;//width;//jcprops.JPGWidth;
jcprops.DIBHeight =-ht;// -height;//jcprops.JPGHeight;
jcprops.DIBChannels = 3;
//--------------------------------------------------//
ipad = (int) fmod(wt,8);
jcprops.DIBPadBytes =ipad;
//----------------------------------------------------//
switch(jcprops.JPGChannels)
{
case 1:
{
jcprops.JPGColor = IJL_G;
break;
}
case 3:
{
jcprops.JPGColor = IJL_YCBCR;
break;
}
default:
{
jcprops.DIBColor = (IJL_COLOR)IJL_OTHER;
jcprops.JPGColor = (IJL_COLOR)IJL_OTHER;
break;
}
}
ijlRead(&jcprops,IJL_JFILE_READWHOLEIMAGE);
iplGetRotateShift(0.0,5.0,0.0, &xshift, &yshift);
iplRotate(img1, img, 5.0, 0,0,IPL_INTER_LINEAR );