Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6712 Discussions

convert from jpeg to bmp, image flipped vertically

awadb
Beginner
415 Views
I am using ipp to decode a jpeg to bmp, but the resulted image is flipped vertically. I don't know why this is happening, any ideas?
0 Kudos
5 Replies
Vladimir_Dudnik
Employee
415 Views
Hi,
JPEG keeps images in natural order where as BMP usually uses bottom-left order (means first scan line of image is most bottom line in BMP file). You can take a look on JPEGView IPP sample to see how to display BMP file correctly
Regards,
Vladimir
0 Kudos
awadb
Beginner
415 Views
When I build the jpegview sample, I get unresolved externals, could you tell what lib I need to link to please
jpgview error LNK2019: unresolved external symbol _ippiMirror_8u_AC4IR@20 referenced in function "void __cdecl RevertScanLinesOrder(unsigned char *,int,int,int,int)" (?RevertScanLinesOrder@@YAXPAEHHHH@Z)
jpgview error LNK2019: unresolved external symbol _ippiMirror_8u_C3IR@20 referenced in function "void __cdecl RevertScanLinesOrder(unsigned char *,int,int,int,int)" (?RevertScanLinesOrder@@YAXPAEHHHH@Z)
jpgview error LNK2019: unresolved external symbol _ippiMirror_8u_C1IR@20 referenced in function "void __cdecl RevertScanLinesOrder(unsigned char *,int,int,int,int)" (?RevertScanLinesOrder@@YAXPAEHHHH@Z)
jpgview error LNK2019: unresolved external symbol "public: virtual __thiscall CJPEGEncoder::~CJPEGEncoder(void)" (??1CJPEGEncoder@@UAE@XZ) referenced in function "protected: int __thiscall CJPGViewDoc::SaveAsJPEG(char const *)" (?SaveAsJPEG@CJPGViewDoc@@IAEHPBD@Z)
jpgview error LNK2019: unresolved external symbol "public: enum _JPEG_ERROR __thiscall CJPEGEncoder::WriteWholeImage(unsigned char *,int *)" (?WriteWholeImage@CJPEGEncoder@@QAE?AW4_JPEG_ERROR@@PAEPAH@Z) referenced in function "protected: int __thiscall CJPGViewDoc::SaveAsJPEG(char const *)" (?SaveAsJPEG@CJPGViewDoc@@IAEHPBD@Z)
jpgview error LNK2019: unresolved external symbol "public: void __thiscall CJPEGEncoder::SetDestination(int,enum _JPEG_SAMPLING,enum _JPEG_COLOR,int,int)" (?SetDestination@CJPEGEncoder@@QAEXHW4_JPEG_SAMPLING@@W4_JPEG_COLOR@@HH@Z) referenced in function "protected: int __thiscall CJPGViewDoc::SaveAsJPEG(char const *)" (?SaveAsJPEG@CJPGViewDoc@@IAEHPBD@Z)
jpgview error LNK2019: unresolved external symbol "public: void __thiscall CJPEGEncoder::SetSource(unsigned char *,int,int,int,int,enum _JPEG_COLOR)" (?SetSource@CJPEGEncoder@@QAEXPAEHHHHW4_JPEG_COLOR@@@Z) referenced in function "protected: int __thiscall CJPGViewDoc::SaveAsJPEG(char const *)" (?SaveAsJPEG@CJPGViewDoc@@IAEHPBD@Z)
jpgview error LNK2019: unresolved external symbol "public: __thiscall CJPEGEncoder::CJPEGEncoder(void)" (??0CJPEGEncoder@@QAE@XZ) referenced in function "protected: int __thiscall CJPGViewDoc::SaveAsJPEG(char const *)" (?SaveAsJPEG@CJPGViewDoc@@IAEHPBD@Z)
jpgview error LNK2019: unresolved exte rnal symbol _ippiDecodeHuffmanStateFree_JPEG_8u@4 referenced in function "public: enum _JPEG_ERROR __thiscall CJPEGDecoder::Clean(void)" (?Clean@CJPEGDecoder@@QAE?AW4_JPEG_ERROR@@XZ)
jpgview error LNK2019: unresolved external symbol _ippiDecodeHuffmanStateInit_JPEG_8u@4 referenced in function "public: enum _JPEG_ERROR __thiscall CJPEGDecoder::ProcessRestart(void)" (?
0 Kudos
Vladimir_Dudnik
Employee
415 Views
I recommend you to read readme.htm "How to build" section and follow these steps.
Vladimir
0 Kudos
awadb
Beginner
415 Views
Believe me I read your readme.htm on how to build the sample. Unless I am missing something, I don't know where IntelIPP41ia32_itanium directory is
Also, I already setup the sample project in vc7.0, but I don't know what libraries requird to resolve the function calls. Do I need to download something else
-----------------------------------------
  • Set up your build environment by creating an environment variable named IPPROOT that points to the root directory of your Intel IPP installation. For example: C:Program FilesIntelIPP41ia32_itanium
    • ---------------------

      0 Kudos
      Vladimir_Dudnik
      Employee
      415 Views
      Of course, you need to install IPP itself to compile IPP samples.
      Note, by default, IPP install path on Windows for IA32 is C:Program FilesIntelIPP41. Could you please check if you have IPP installed on your system?
      In any case, to link JPEGView sample you need ippcore, ipps, ippi and ipps libraries
      Regards,
      Vladimir
      0 Kudos
      Reply