Questions tagged [boost-gil]

The Boost Generic Image Library (Boost.GIL) is a C++ library that abstracts image representations from algorithms and allows writing code that can work on a variety of images with performance similar to hand-writing for a specific image type.

The Boost Generic Image Library (Boost.GIL) is a C++ library that abstracts image representations from algorithms and allows writing code that can work on a variety of images with performance similar to hand-writing for a specific image type.

69 questions
16
votes
2 answers

Boost::GIL bits8* to gray8_ptr_t without reinterpret_cast?

Trying to work by the design guidelines for GIL, I use bits__ for my channel data types. I often have external data I'm wrapping into GIL image views. However, even using the bits__ types for data pointers, I have to add in a reinterpret_cast before…
totowtwo
  • 2,101
  • 1
  • 14
  • 21
16
votes
1 answer

Creating image with Boost.GIL

I've been trying to read the boost::gil documentation, but it's somewhere between lacking, and convoluted. Ranting aside, I need an example on how to do the following: Create an image of, say 512x512. Fill it with red pixels. Write to PNG. I can't…
Brian
  • 331
  • 3
  • 12
16
votes
4 answers

Designing Algorithms that Require Scratch Space

The C++ Standard Library separates data structures from algorithms, such as with std::sort: template< class RandomAccessIterator > void sort( RandomAccessIterator first, RandomAccessIterator last ); I would like to maintain separation of algorithms…
Andrew Hundt
  • 2,551
  • 2
  • 32
  • 64
9
votes
3 answers

Boost::GIL 'jpeglib.h': No such file or directory

#include #include int main() { using namespace boost::gil; rgb8_image_t img; jpeg_read_image("test.jpg",img); } I included $BOOST_ROOT to VS 2010 project properties -> C/C++ ->…
orko
  • 91
  • 1
  • 1
  • 2
6
votes
2 answers

Drawing lines with boost::gil?

I need to draw some lines on an (off-screen) image. I'd like to use boost::gil because the lib is already integrated in my project. I want to draw a line from start to end point in a 2dim array Can anybody give me a quick example how to draw a line…
anhoppe
  • 4,287
  • 3
  • 46
  • 58
5
votes
1 answer

gil boost : convert rgb8_image_t to rgba8_image_t

I'm a little bit confusing about GIL syntax. I want to convert rgb8_image_t to rgba8_image_t and set alpha channel to 1. Is there any built-in function. If not how to do this manually?
blackwater
  • 331
  • 1
  • 3
  • 7
4
votes
4 answers

Using Boost.GIL to convert an image into "raw" bytes

Goal I'm trying to move towards Boost GIL to replace some similar functionality I've implemented that is reaching the end of its maintainable life. I have existing code that works with 24 BPP, 8bit RGB images using uint8_t*. I can't change that as…
Flexo
  • 87,323
  • 22
  • 191
  • 272
4
votes
2 answers

Reading png images with gil

Is it possible with boost::gil to read the RGB image information so that I can read the file into the correct rgbx_image_t? With the following I have to know the type beforehand and that is not so neat. boost::gil::rgb8_image_t…
Buzzzz
  • 887
  • 3
  • 11
  • 18
4
votes
2 answers

Boost::GIL How to save image as JPEG or PNG into char*?

So I see samples all around on saving into file. But I wonder if it is possible to save into char* or string instead of file - so to say keep it in memory?
Rella
  • 65,003
  • 109
  • 363
  • 636
4
votes
2 answers

Boost gil read image errors

I wanted write simple program to read and edit image with boost::gil. Error occurs always with read image function. I proceed tutorials found on boost site. #include #include #include…
Morales1235
  • 103
  • 10
4
votes
2 answers

LibPNG + Boost::GIL: png_infopp_NULL not found

I always get this error when trying to compile my file with Boost::GIL PNG IO support: (I'm running Mac OS X Leopard and Boost 1.42, LibPNG 1.4) /usr/local/include/boost/gil/extension/io/png_io_private.hpp: In member function 'void…
Viet
  • 17,944
  • 33
  • 103
  • 135
4
votes
2 answers

Read a JPEG image from memory with boost::gil

I am trying to read an image from memory by using boost::gil present in boost 1.53. I have taken the following lines from an example taken from internet: #include boost::gil::rgb8_image_t…
Martin
  • 9,089
  • 11
  • 52
  • 87
3
votes
0 answers

Using Boost::GIL library with Openjpeg library to convert any common format to jpeg2000

I'm new to image processing. I was able to use the Boost Generic Image Library (Boost::GIL) to convert between common formats such as Bitmaps, JPEG, PNG, and TIFF. Now, I want to use the openjpeg library to convert any common format to…
BunRieuCua
  • 53
  • 4
3
votes
2 answers

How to extract channel type from Boost::GIL view type?

I cant find the correct way to extract the pixel or channel type from an image view. I'm looking to define pod_t below to be 'unsigned char' in the case of gray8_view_t. There is no simple ViewType::pixel_t. What is the proper definition of this…
totowtwo
  • 2,101
  • 1
  • 14
  • 21
3
votes
1 answer

reading transparent images boost.gil C++

I have a image with a transparent background and I want to copy it over another image both images are png format I've tried using boost::gil::rgba8_image_t but it still copies the transparent image with a gray background instead. this is what I've…
simamt
  • 125
  • 1
  • 5
1
2 3 4 5