Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3810160
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:25:02+00:00 2026-05-19T15:25:02+00:00

I’m currently trying to figure out how to use the Generic Image Library included

  • 0

I’m currently trying to figure out how to use the Generic Image Library included in Boost. Right now, I just want to use the library to store pixel data and use the Image IO to write PNGs. I’m having trouble understanding just how to set up the object however.

The hpp says

image(const point_t& dimensions,
      std::size_t alignment=1) : _memory(0), _align(alignment) {
    allocate_and_default_construct(dimensions);
}

but I cannot find any references to point_t except a type_def for view_t::point_t to point_t.

Also, the tutorial found with the GIL seems to only include writing filters and generic algorithms, and thus each function example they provide has a source image view, from which they take the dimensions.

Am I going about this the wrong way? Or is there something I’ve missed completely?

Thanks in advance

Edit: I don’t know if anyone cares, or has read this, but for the record, I just used the boost interleaved image function to create a PNG. It’s not exactly the same solution, but it works for my applications.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T15:25:02+00:00Added an answer on May 19, 2026 at 3:25 pm

    it sounds like you solved your problem in the meantime, but just for the record… here are some pointers to information about your problem:

    1. First of all you may have missed the second constructor of boost::gil::image, which offers explicit access to the horizontal and vertical dimensions without the need of the point_t:

      image(x_coord_t width, y_coord_t height,
          std::size_t alignment=0,
          const Alloc alloc_in = Alloc()) : _memory(0), _align_in_bytes(alignment), _alloc(alloc_in) {
          allocate_and_default_construct(point_t(width,height));
      }
      
    2. point_t will most likely refer to the point2 class template defined in boost/gil/utilities.hpp.

    3. In general you should check the complete documentation of Boost GIL for all questions not mentioned in the tutorial. For a deeper understanding of the library it is absolutely necessary to get familiar with the Design Guide and the Doxygen Documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I am confused How to use looping for Json response Array in another Array.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.