LibGd 2.4.0-dev
GD Graphics library
Loading...
Searching...
No Matches
Functions
gdpp.cxx File Reference

Implements the non-trivial methods of GD::Image. More...

#include "gdpp.h"
Include dependency graph for gdpp.cxx:

Functions

std::istream & operator>> (std::istream &in, GD::Image &img)
 

Detailed Description

Implements the non-trivial methods of GD::Image.

Implementation of the more complex methods defined in gdpp.h. Notably includes the methods which determine the image file format of a file before reading it into memory.

Function Documentation

◆ operator>>()

std::istream & operator>> ( std::istream &  in,
GD::Image &  img 
)

Load an image from a standard input stream, regardless of it's image file format. You can call Width() and Height() member functions of the image to determine its size. Example usage, convert anything to gif: #include <fstream> #include <gdpp.h>

std::ifstream in("image.xxx", std::ios_base::in | std::ios_base::binary ); GD::Image im; in >> im; if (im.good()) { std::ofstream out("image.gif", std::ios_base::out | std::ios_base::binary ); im.Gif(out); }