bugpng++, a C++ wrapper for libpng - Bugs: bug #52305, Tutorial.


bug #52305: Tutorial.

Submitted by:  None
Submitted on:  Sun 29 Oct 2017 06:22:30 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 29 Oct 2017 08:06:37 PM UTC, comment #1:


Thank you for the submission as discussed per private email earlier.

I see where you're heading to, however, I don't find the provided example practical. For one, there is a more efficient way to learn the width and height of a PNG image, than fully loading the image in memory first. That would involve creating a `reader` instance and calling its `read_info` method.

I could add this as a tutorial, but maybe it would make more sense to provide an additional example program? It is this short in the nutshell:

std::ifstream file(filename, std::ios::binary);
png::reader< std::istream > rd(file);
std::cout << "width: " << rd.get_width() << std::endl;
std::cout << "height: " << rd.get_height() << std::endl;

Your examples with `getWidth/Height()` functions doesn't seem really practical too, unfortunately. I would not include them in the tutorial.

Alexander Shulgin <alexshulgin>
Project Administrator
Sun 29 Oct 2017 06:22:30 PM UTC, original submission:

Tutorial on reading the width and height png files.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #42292:  tutorial.patch added by None (2KiB - application/octet-stream - Mini-tutorial patch.)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by alexshulgin (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-29 alexshulgin StatusNone => Need Info
    2017-10-29 None Attached File- => Added tutorial.patch, #42292

    Back to the top

    Powered by Savane 3.3