Image rotation using intel image processing

This is a discussion on Image rotation using intel image processing within the Windows Programming forums, part of the Platform Specific Boards category; Dear friends i am using intel image processing library to rotate my image. if the image width is divesible by ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    5

    Talking Image rotation using intel image processing

    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 );

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Posts
    5,439
    My docs say:

    Code:
    jcprops.DIBWidth = (((width * num_bits) + 31) & ~31) >> 3;
    jcprops.DIBPadBytes = jcprops.DIBWidth - (jcprops.DIBChannels * width);
    Code:
    int main(void){srand(time(0));for(double l=rand(),l0=0,l00=0;;l0+=0.1){for(double l000=0;l000
    <1;l000+=.001,l+=((double)rand()/RAND_MAX)/0x64,l00+=((sin(l*0x8*atan(l0)*l000-(l0*0x8*atan
    (l)))*0.5)+0.5)){l00-=floor(l00);for(size_t l0000=0,l00000=(size_t)(0x50*(l00));l0000<l00000;++l0000
    )putchar(0x20);putchar(0x61+(int)((double)rand()/RAND_MAX*0x1a));putchar('\n');}}return 0;}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple Image Processing
    By ejohns85 in forum C++ Programming
    Replies: 4
    Last Post: 03-19-2009, 12:10 PM
  2. Image rotation - doesn't always work
    By ulillillia in forum C Programming
    Replies: 12
    Last Post: 05-03-2007, 12:46 PM
  3. Intel syntax on MinGW ?
    By TmX in forum Tech Board
    Replies: 2
    Last Post: 01-06-2007, 08:44 AM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. Replies: 4
    Last Post: 03-02-2003, 08:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21