Library producing 12MB MIFF images
Posted: 2019-09-11T08:39:40-07:00
Hi
I have an application that reads a stream of bytes from a VGA port and sends it to MAgickWand function MagickConstituteImage() to create an image from raw uint8_t data. Then I am calling MagickSetImageCompressionQuality() to reduce the quality of image followed by MagickWriteImage() used to create a final image in JPEG format.
MagickConstituteImage(wand, 1920, 1080, BGRP, CharPixel, buffer)
MagickSetImageCompressionQuality(wand, 45)
MagickWriteImage(wand, "file.jpeg")
ClearMagickWand(wand)
At the end here I am getting an image.
Now, I tried with two IM libs built differently on my Ubuntu 16.04.6 LTS, x86-64 bit mAchine
1) the rpms from ImageMagick-devel-7.0.8-63.x86_64.rpm
ImageMagick-libs-7.0.8-63.x86_64.rpm. I converted these rpms to .deb files and then installed on my machine. The above application produced a MIFF image of 12MB each time and the image does not open throwing an error.
2)I also created rpms with make rpm command from 7.0.8.63 and I am facing the same issue as stated in 1 (where I am getting the image in MIFF format and the image won't open)
3) I checked out a code from ImageMagick github, version 7.0.8.63. I called ./configure and make and used the libMagickCore-7.Q16HDRI.so.6 and libMagickWand-7.Q16HDRI.so.6 created from there to run my application. I am getting the JPEG version and my image size is 192KB.
My questions:
1) Is anything obvious that I am missing while directly loading the libs from rpms, since I face the issue in both 7.0.8.63 and 7.0.8.64. Are there additional libs required to be loaded in tandem with imagemagick-devel and imagemagick-libs or is there any other version that does not have this issue?
2)Is MIFF an intermediate state of images to be converted using coders?
3)What is it that I could be missing when using the libs from rpms (steps 1 and 2) as compared to making the libs from source
code(step 3) and using it. The same application as above is producing MIFF in the first two cases and a JPEG in the 3rd case.
I have an application that reads a stream of bytes from a VGA port and sends it to MAgickWand function MagickConstituteImage() to create an image from raw uint8_t data. Then I am calling MagickSetImageCompressionQuality() to reduce the quality of image followed by MagickWriteImage() used to create a final image in JPEG format.
MagickConstituteImage(wand, 1920, 1080, BGRP, CharPixel, buffer)
MagickSetImageCompressionQuality(wand, 45)
MagickWriteImage(wand, "file.jpeg")
ClearMagickWand(wand)
At the end here I am getting an image.
Now, I tried with two IM libs built differently on my Ubuntu 16.04.6 LTS, x86-64 bit mAchine
1) the rpms from ImageMagick-devel-7.0.8-63.x86_64.rpm
ImageMagick-libs-7.0.8-63.x86_64.rpm. I converted these rpms to .deb files and then installed on my machine. The above application produced a MIFF image of 12MB each time and the image does not open throwing an error.
2)I also created rpms with make rpm command from 7.0.8.63 and I am facing the same issue as stated in 1 (where I am getting the image in MIFF format and the image won't open)
3) I checked out a code from ImageMagick github, version 7.0.8.63. I called ./configure and make and used the libMagickCore-7.Q16HDRI.so.6 and libMagickWand-7.Q16HDRI.so.6 created from there to run my application. I am getting the JPEG version and my image size is 192KB.
My questions:
1) Is anything obvious that I am missing while directly loading the libs from rpms, since I face the issue in both 7.0.8.63 and 7.0.8.64. Are there additional libs required to be loaded in tandem with imagemagick-devel and imagemagick-libs or is there any other version that does not have this issue?
2)Is MIFF an intermediate state of images to be converted using coders?
3)What is it that I could be missing when using the libs from rpms (steps 1 and 2) as compared to making the libs from source
code(step 3) and using it. The same application as above is producing MIFF in the first two cases and a JPEG in the 3rd case.