Blob Blame History Raw
.TH EZDXF\-PILLOW "1" "September 2022" "" "User Commands"
.B ezdxf\ pillow
Draw and convert DXF files by the Pillow backend
.SH SYNOPSIS
.B ezdxf\ pillow
.RB [ \-h ]
.RB [ \-o\ \fIOUT ]
.RB [ \-l\ \fILAYOUT ]
.RB [ \-i\ \fIIMAGE_SIZE ]
.RB [ \-b\ \fIBACKGROUND ]
.RB [ \-r\ \fIOVERSAMPLING ]
.RB [ \-m\ \fIMARGIN ]
.RB [ \-t\ \fR{\fB0\fR,\fB1\fR,\fB2\fR,\fB3\fR }]
.RB [ \-\-dpi\ \fIDPI ]
.RB [ \-v ]
.RI [ FILE ]
.SH DESCRIPTION
An advantage over the
.BR ezdxf\-draw (1)
command is the speed and much less memory usage;
a disadvantage is the lower text rendering quality.
The speed advantage is lost for the text modes
.B OUTLINE
and
.BR FILLED ,
because the text-path rendering is done by Matplotlib,
but the advantage of the lower memory consumption remains.
.SH OPTIONS
.SS "POSITIONAL\ ARGUMENTS"
.TP
.I FILE
DXF file to draw
.SS "OPTIONAL\ ARGUMENTS"
.TP
.B \-h\fR,\ \fB\-\-help
show a help message and exit
.TP
.B \-o\ \fIOUT\fR, \fB\-\-out\ \fIOUT
output filename, the filename extension defines the image format
.RB ( .png ,
.BR .jpg ,
.BR .tif ,
.BR .bmp ,\ ...)
.TP
.B \-l\ \fILAYOUT\fR, \fB\-\-layout\ \fILAYOUT
name of the layout to draw, default is
.BR \(lq Model \(rq
.TP
.B \-i\ \fIIMAGE_SIZE\fR, \fB\-\-image_size\ \fIIMAGE_SIZE
image size in pixels as
.RI \(lq width\fB,\fIheight \(rq,
default is "1920,1080",
.RB \(lq 1920,1080 \(rq,
supports also
.RB \(lq x \(rq
as delimiter like
.RB \(lq 1920x1080 \(rq.
A single integer is used for both directions e.g.
.RB \(lq 2000 \(rq
defines an image size of
.BR 2000x2000 .
The image is centered for the smaller DXF drawing extent.
.TP
.B \-b\ \fIBACKGROUND\fR, \fB\-\-background\ \fIBACKGROUND
override background color in hex format
.RI \(lq RRGGBB \(rq
.RI \(lq RRGGBBAA \(rq,
e.g. use
.RB \(lq FFFFFF00 \(rq
to get a white transparent background and a black foreground color
(ACI=7), because a light background gets a black foreground color
or vice versa
.RB \(lq 00000000 \(rq
for a black transparent background and a white foreground color.
.TP
.B \-r\ \fIOVERSAMPLING\fR, \fB\-\-oversampling\ \fIOVERSAMPLING
oversampling factor, default is
.BR 2 ,
use
.B 0
or
.B 1
to disable oversampling
.TP
.B \-m\ \fIMARGIN\fR, \fB\-\-margin\ \fIMARGIN
minimal margin around the image in pixels, default is
.B 10
.TP
.B \-t\ \fR{\fB0\fR,\fB1\fR,\fB2\fR,\fB3\fR}, \fB\-\-text\-mode\ \fR{\fB0\fR,\fB1\fR,\fB2\fR,\fB3\fR}
text mode:
.BR 0 = ignore ,
.BR 1 = placeholder ,
.BR 2 = outline ,
.BR 3 = filled ,
default is
.B 2
.TP
.B \-\-dpi\ \fIDPI
output resolution in pixels/inch
which is significant for the linewidth, default is
.B 300
.TP
.B \-v\fR,\ \fB\-\-verbose
give more output
.SH ENVIRONMENT
See
.BR ezdxf (1).
.SH FILES
See
.BR ezdxf (1).
.SH EXAMPLES
.P
Convert the DXF file
.RB \(lq gear.dxf \(rq
into a PNG file by the
.I Pillow
backend:
.P
.in +7n
.EX
.B $\ ezdxf\ pillow\ \-o\ gear.png\ \ gear.dxf
.EE
.in
.SH "SEE\ ALSO"
.BR ezdxf (1)
.P
.BR ezdxf\-pp (1),
.BR ezdxf\-audit (1),
.BR ezdxf\-draw (1),
.BR ezdxf\-view (1),
.BR ezdxf\-browse (1),
.BR ezdxf\-browse\-acis (1),
.BR ezdxf\-strip (1),
.BR ezdxf\-config (1),
.BR ezdxf\-info (1)