Optflag

Enum Optflag 

Source
#[repr(u8)]
pub enum Optflag {
Show 33 variants OutFile = 111, UseSevenBitMode = 55, UseEightBitMode = 56, HasGRIArgLimit = 82, NumColors = 112, Mapfile = 109, Monochrome = 101, Insecure = 107, InvertBackground = 105, UseHighColor = 73, UseMacro = 117, MacroNumber = 110, ComplexionScore = 67, IgnoreGIFDelay = 103, StaticGIF = 83, Diffusion = 100, FindLargest = 102, SelectColor = 115, CropRegion = 99, Width = 119, Height = 104, Resampling = 114, QualityMode = 113, LoopMode = 108, PaletteType = 116, BuiltinPalette = 98, EncodingPolicy = 69, BackgroundColor = 66, PenetrateScreen = 80, PipeInput = 68, Verbose = 118, Version = 86, Help = 72,
}
Expand description

Flags used in the easy encoder API.

Flags are the same as the ones used in the img2sixel executable

Variants§

§

OutFile = 111

Specify output file name

§

UseSevenBitMode = 55

Use sixel images for 7 bit terminals or printers

Default of the 2 bit mode flags

§

UseEightBitMode = 56

Use sixel images for 8 bit terminals or printers

§

HasGRIArgLimit = 82

Limit the arguments of DECGRI(‘!’) to 255

§

NumColors = 112

Specify the number of colors to reduce the image to

Defaults to 256

Renamed from “SIXEL_OPTFLAG_COLORS”

§

Mapfile = 109

Give a file that specifies a set of colors

Transforms the image to match the set

§

Monochrome = 101

Output a monochrome sixel image

Assumes the terminal background color is black

§

Insecure = 107

Connect to SSL sites without certs

Only applicable if libcurl is used

§

InvertBackground = 105

Assume the terminal background color is white

Only applicable when also using Optflag::Monochrome

§

UseHighColor = 73

Output a 15bpp sixel image

§

UseMacro = 117

Use DECDMAC and DEVINVM sequences to optimize GIF animation rendering

§

MacroNumber = 110

Specify a macro register number

§

ComplexionScore = 67

Specify the number of arguments for the score of complexion correction

Must be 1 or more

§

IgnoreGIFDelay = 103

Ignore delay when rendering GIF animations

§

StaticGIF = 83

Render an animated GIF as a static image

§

Diffusion = 100

Choose a diffusion method to be used with the NumColors option

Should be a DiffusionMethod DiffusionMethod: enum.DiffusionMethod.html

§

FindLargest = 102

Choose a method for finding the largest dimension of median cut boxes for splitting

Should be a MethodForLargest MethodForLargest: enum.MethodForLargest.html

§

SelectColor = 115

Choose the method for selecting the representative color from each median-cut box.

Only makes sense when the Optflag::NumColors is used

Should be a MethodForRepColor MethodForRepColor: enum.MethodForRepColor.html

§

CropRegion = 99

Crop a source image to fit some geometry

String format representation is “%dx%d+%d+%d”, which is width, height, x, y

§

Width = 119

Resize an image to a specified width

Uses the following syntax:

  • auto

  • <number>% scale with a percentage

  • <number> scale a number of pixel counts

  • <number>px scale a number of pixel counts

§

Height = 104

Resize an image to a specified height

Uses the following syntax:

  • auto

  • <number>% scale with a percentage

  • <number> scale a number of pixel counts

  • <number>px scale a number of pixel counts

§

Resampling = 114

Choose a filter for resampling when scaling the image due to Optflag::Width or Optflag::Height

Should be a ResamplingMethod ResamplingMethod: enum.ResamplingMethod.html

§

QualityMode = 113

Selects quality of color quanlization

Should be a QualityMode QualityMode: enum.QualityMode.html

§

LoopMode = 108

Select loop behavior for animated GIFs

Should be a LoopMode LoopMode: enum.LoopMode.html

§

PaletteType = 116

Select a palette color space

Should be a PaletteType PaletteType: enum.PaletteType.html

§

BuiltinPalette = 98

Choose a built-in palette type

Should be a BuiltinDither BuiltinDither: enum.BuiltinDither.html

§

EncodingPolicy = 69

Choose an encoding policy

Should be a EncodePolicy EncodePolicy: enum.EncodingPolicy.html

§

BackgroundColor = 66

Specify a background color

Represented by the following syntax:

#rgb
#rrggbb
#rrrgggbbb
#rrrrggggbbbb
rgb:r/g/b
rgb:rr/gg/bb
rgb:rrr/ggg/bbb
rgb:rrrr/gggg/bbbb
§

PenetrateScreen = 80

Penetrate GNU Screen using DCS pass-through sequence

§

PipeInput = 68

Read source images from stdin continuously

§

Verbose = 118

Print debugging info

§

Version = 86

Print version and license info

§

Help = 72

Print a help message

Trait Implementations§

Source§

impl Clone for Optflag

Source§

fn clone(&self) -> Optflag

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Optflag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Optflag

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Optflag

Source§

fn eq(&self, other: &Optflag) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Optflag

Source§

impl Eq for Optflag

Source§

impl StructuralPartialEq for Optflag

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.