I found that JPEG2000 has an alpha channel, and I want to change PNG format to JPEG2000 in my project which is based on SDL 2.0.3 and SDL_Image. Is it possible to use JPEG2000 in SDL?
As far as I know there is no support for JPEG2000 in stock SDL_Image. What you can do is find the necessary libraries/headers and implement this directly, maybe using SDL_Image to load your PNGs into surfaces/textures and then writing your own methods for exporting to JPEG2000.
Related
I'm very new to using libraries for C++ and I have some doubts. I will need to work with medical images, MRI in particular, (DICOM format). I want to process those images - get the particular pixel values. However, as I read, I need some additional libraries to be able to work with DICOM file format in C++. I found VTK and ITK libraries. However, I'm not sure if it is libraries for c++... Does anyone know? DO I only need to download it, install and use it in my C++ code or is it a separate tool with GUI? Will I be able to read DICOM file formats and access its pixel values and manipulate it with C++?
Thanks
VTK and ITK are both open source C++ libraries.
I think the confusion might come from the VTK file source formats which can be vizualize by a GUI interface Paraview.
Kitwares propose several tools in medical imaging, data vizualization, which can be used "together" hence the confusion.
But you can consider VTK and ITK as C++ libraries.
ITK and VTK are libraries written in C++, so you can download the code, compile the libraries and link them with your C++ code. ITK supports reading and writing DICOM files, along with a host of there medical image formats. You will be able to access pixel values in your C++ code using ITK.
ITK and VTK are written in C ++.
But if you want somenter read DICOM files, recomento use only VTK.
VTK is responsible for data representation as part ITK will treat filter handling.
vtkDICOMImageReader is the recommended class for reading DICOM files (.dcm or .dir)
If you choose to use VTK and ITK, will have to activate the function itkvtkglue
Sorry if this has already been asked, but I'm making a program on linux with C++/linux and I want to use FreeType to draw text on the screen. Once I'm done I will need to distribute this program. What's the best way to do that with FreeType?
make a script that downloads/compiles/installs freetype?
Can I somehow statically link it to my program?
Thanks!
Download the library from here Use this link to extract border points from freeType glyph and draw the same using any graphics library X11/GDI to draw it on surface and yes you can statically link it with your program.
I noticed the boost::gil::extension::io only supports png or jpeg files.. While this is often enough I'm wondering how to load a bitmap (*.bmp) file into an image? Shouldn't this be actually easier than jpeg etc?
Hopefully you solved it.
Just to add: install latest version of GIL on existing boost and then compile.
The bitmap files comes under new 'io_new' folder.
I need to create application on C++ for video conversion, and I can't use ffmpeg.exe.
I need to do it programmatically, but I don't know how can I do it, and I didn't find any examples on Internet.
May be somebody know something about my task? Thank you.
ffmpeg is an open source project. The transcoding engine used by ffmpeg is in the libraries libavcodec (for the codecs) and libavformat (for the containers). You can write your conversion as calls into these libraries, without the ffmpeg command line application.
Here is a tutorial on using these libraries.
Good luck.
Here's another good ffmpeg tutorial. Looking at the actual source code for ffmpeg would also help.
An updated version of the tutorial source is here.
How can I get a libtiff TIFF object from a MagickWand object (in C)?
I want to open any given image type with ImageMagick and run tesseract on it. Tesseract seems to use libtiff for it's IO, ImageMagick seems to use libtiff for it's tiff handling, so I figured I should somehow be able to use ImageMagick with tesseract without meddling in the filesystem and additional unessesary disk IO.
Thanks,
Chenz
Look at BeginPageUpright() in Tesseract. It takes the image width, height, bpp, and the raw uncompressed data, which you should be able to get from ImageMagick.