Graphics::Potrace::Raster::Ascii - importer of ASCII images for Graphics::Potrace
use Graphics::Potrace::Raster; my $bitmap = Graphics::Potrace::Raster->new(); $bitmap->load(Ascii => filename => '/path/to/ascii.txt');
This class is an importer for Graphics::Potrace. It derives from Graphics::Potrace::Raster::Importer, so see it for generic methods. In particular, this class overrides "load_handle" in order to provide means to load a raster image from an ASCII file.
The ASCII file is considered to contain a matrix of characters that will be treated as blanks (by default dots, spaces and zeroes) or filled ones (any other character). You can set your "idea" of what an empty pixel is by means of "empty_tester" (which you can set in the constructor as well).
All the methods in Graphics::Potrace::Raster::Imported are supported. In addition, the following method is provided:
Accessor to an internal variable for setting a regular expression to be used to check whether a pixel is empty or not. By default it is the regular expression
Flavio Poletti <firstname.lastname@example.org>
Copyright (C) 2011-2015 by Flavio Poletti email@example.com.
This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.