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

 
 

bug #52305: Tutorial.

Submitter:  None
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup
   

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

Hi,

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);
    rd.read_info();
    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>
Group administrator
Sun 29 Oct 2017 06:22:30 PM UTC, original submission:  

Tutorial on reading the width and height png files.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    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.13-758e.
    Corresponding source code