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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Need Info
Privacy: PublicAssigned 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 File(s):

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
  • -unavailable- added by alexshulgin (Posted a comment)

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

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 29 Oct 2017 08:06:37 PM UTCalexshulginStatusNone=>Need Info
    Sun 29 Oct 2017 06:22:30 PM UTCNoneAttached File-=>Added tutorial.patch, #42292

    Back to the top

    Powered by Savane 3.1-cleanup1