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
3
votes
1 answer

How to set a pixel using GIL iterators

Trying to learn a bit of C++ and I am very new at it. My learning project is to generate images using various algorythms (like fractals). I am looking at the boost GIL library, since boost seems to be the most common and established C++ library…
Mad Wombat
  • 14,490
  • 14
  • 73
  • 109
3
votes
1 answer

Convert CYMK image to RGB using BOOST::GIL

I am trying to use the boost generic image library to convert CYMK images to RGB. The following code does not compile // read cmyk image file cmyk8_image_t img; jpeg_read_image( "1502-T2-C-PER.jpg", img ); // convert to rgb rgb8_image_t rgb(…
ravenspoint
  • 19,093
  • 6
  • 57
  • 103
3
votes
1 answer

boost::gil Interleaved_view

I'm having some trouble figuring out the boost image library. I could not find any exact documentation on how to use the interleaved_view function included in the boost::gil library. More specifically, I don't know exactly what binary format the…
Xzhsh
  • 2,239
  • 2
  • 22
  • 32
3
votes
1 answer

How to resize png image with alpha canal in boost::gil

How to resize png image with alpha canal in boost::gil? boost::gil::rgb8_image_t image; boost::gil::rgb8_image_t newSize(640, 480); boost::gil::png_read_and_convert_image("input.png",image); boost::gil::resize_view(const_view(image), view(newSize),…
3
votes
2 answers

Cannot use Boost GIL to detect image filetype (exception not caught)

I need to test if a file is a JPEG or PNG and I can not trust the file extension because it might be wrong. To accomplish this I decided to use GIL. Here's the header file declaring (and defining) boost::gil::png_read_dimensions. It clearly states…
user3121124
3
votes
1 answer

use boost::boyer_moore with boost::gil

I want to search for a small image from a large one, my algorithm is: search for the first line if first line matches, then compare the rest I want to use boost::algorithm::boyer_moore to do the line searching, it works fine with…
aj3423
  • 2,003
  • 3
  • 32
  • 70
3
votes
1 answer

Boost Gil is able to rasterize a font?

I would like to ask if with Boost Gil alone I can render text into an image using a custom ttf/otf font, my impression is that there is no such thing in Boost Gil, and so I should adopt something like freetype, but since I don't like to add yet…
user2485710
  • 9,451
  • 13
  • 58
  • 102
3
votes
1 answer

Boost gil get buffer from rgb8_view_t

I need to use boost GIL library to load a '.bmp' image, copy it to buffer and send it through sockets. I copied the image in rgb8_view_t and tried to get pixels out of it but found no function which can do so. Following is the code snippet I…
Aman
  • 696
  • 1
  • 8
  • 26
3
votes
1 answer

Getting raw pointer from boost::gil::view

I have a boost::gil::view which is interleaved. I want to construct my own model from this view which accepts the byte* of raw pixel data. How can I get the raw data pointer from boost::gil::view? I checked its interface, it returns locators and…
Aarkan
  • 3,811
  • 6
  • 40
  • 54
2
votes
2 answers

boost::gil pointer to bgr8_view_t object

I want to write a function for converting BGRA in BGR. void convertBGRAViewtoBGRView( const boost::gil::bgra8_view_t &src, boost::gil::bgr8_view_t dst ) If I write it like this: size_t numPixels = src.width() *…
steffenmauch
  • 353
  • 5
  • 16
2
votes
1 answer

how to link lpng package

I use VC++, boost::gil package and lpng package to read a png image. After debuging I have following linking problem: Error 3 error LNK2001: unresolved external symbol _png_set_swap img_seq_interp.obj img_seq_interp Error 4 error LNK2001:…
frederik
  • 51
  • 3
2
votes
1 answer

Boost::GIL: reading *.png image with alpha channel is missing antialiasing

I'm using boost 1.74. So, without exception catches and rest stuff my actual code looks like: typedef std::vector FlatINT32TArr; using PreviewImageT = bg::rgba8_image_t; using PreviewViewT = bg::rgba8_view_t; using PreviewPixelT =…
ivpe
  • 47
  • 5
2
votes
1 answer

Writing a jpeg file with boost::gil

I am trying to read a jpeg file, do some simple transformation and write it out using boost::gil library. Right now I am stuck as even reading out a file, extracting non-white points (it contains only red and white points) and writing them into…
jlanik
  • 859
  • 5
  • 12
2
votes
1 answer

C++ - Is it possible to edit the data inside an ifstream?

I'm trying to use Boost-GIL to load an image. The read_image function takes ifstream as a parameter, but I will already have the image as a base64 encoded string. Is it possible for me to add the decoded image into an ifstream manually, so that I…
Stone
  • 23
  • 4
2
votes
2 answers

Boost::GIL read images from memory

I need to be able to load images (jpeg, png etc.) from the memory in Boost::Gil framework. Is there a way to do that? Thanky for your answers!
Van Coding
  • 24,244
  • 24
  • 88
  • 132