blob: fb56a3c5b62208390c1a4a0f0d9e1245cb03158f [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A generalized pixel."><meta name="keywords" content="rust, rustlang, rust-lang, Pixel"><title>Pixel in image - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../normalize.css"><link rel="stylesheet" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../ayu.css" disabled><link rel="stylesheet" href="../dark.css" disabled><link rel="stylesheet" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../image/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../image/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Pixel</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Subpixel">Subpixel</a></li></ul><h3><a href="#required-associated-consts">Required Associated Constants</a></h3><ul class="block"><li><a href="#associatedconstant.CHANNEL_COUNT">CHANNEL_COUNT</a></li><li><a href="#associatedconstant.COLOR_MODEL">COLOR_MODEL</a></li><li><a href="#associatedconstant.COLOR_TYPE">COLOR_TYPE</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.apply">apply</a></li><li><a href="#tymethod.apply2">apply2</a></li><li><a href="#tymethod.apply_with_alpha">apply_with_alpha</a></li><li><a href="#tymethod.blend">blend</a></li><li><a href="#tymethod.channels">channels</a></li><li><a href="#tymethod.channels4">channels4</a></li><li><a href="#tymethod.channels_mut">channels_mut</a></li><li><a href="#tymethod.from_channels">from_channels</a></li><li><a href="#tymethod.from_slice">from_slice</a></li><li><a href="#tymethod.from_slice_mut">from_slice_mut</a></li><li><a href="#tymethod.invert">invert</a></li><li><a href="#tymethod.map">map</a></li><li><a href="#tymethod.map2">map2</a></li><li><a href="#tymethod.map_with_alpha">map_with_alpha</a></li><li><a href="#tymethod.to_bgr">to_bgr</a></li><li><a href="#tymethod.to_bgra">to_bgra</a></li><li><a href="#tymethod.to_luma">to_luma</a></li><li><a href="#tymethod.to_luma_alpha">to_luma_alpha</a></li><li><a href="#tymethod.to_rgb">to_rgb</a></li><li><a href="#tymethod.to_rgba">to_rgba</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.apply_without_alpha">apply_without_alpha</a></li><li><a href="#method.channel_count">channel_count</a></li><li><a href="#method.color_model">color_model</a></li><li><a href="#method.color_type">color_type</a></li><li><a href="#method.map_without_alpha">map_without_alpha</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In image</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="index.html">image</a>::<wbr><a class="trait" href="#">Pixel</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/image/traits.rs.html#105-255">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait Pixel: Copy + Clone {
type <a href="#associatedtype.Subpixel" class="associatedtype">Subpixel</a>: <a class="trait" href="trait.Primitive.html" title="trait image::Primitive">Primitive</a>;
const <a href="#associatedconstant.CHANNEL_COUNT" class="constant">CHANNEL_COUNT</a>: u8;
const <a href="#associatedconstant.COLOR_MODEL" class="constant">COLOR_MODEL</a>: &amp;'static str;
const <a href="#associatedconstant.COLOR_TYPE" class="constant">COLOR_TYPE</a>: <a class="enum" href="enum.ColorType.html" title="enum image::ColorType">ColorType</a>;
<details class="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show 25 methods</span></summary>
fn <a href="#tymethod.channels" class="fnname">channels</a>(&amp;self) -&gt; &amp;[Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>];
<span class="item-spacer"></span> fn <a href="#tymethod.channels_mut" class="fnname">channels_mut</a>(&amp;mut self) -&gt; &amp;mut [Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>];
<span class="item-spacer"></span> fn <a href="#tymethod.channels4" class="fnname">channels4</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self<br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; (Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>, Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>, Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>, Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>);
<span class="item-spacer"></span> fn <a href="#tymethod.from_channels" class="fnname">from_channels</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a: Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b: Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c: Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d: Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.from_slice" class="fnname">from_slice</a>(slice: &amp;[Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>]) -&gt; &amp;Self;
<span class="item-spacer"></span> fn <a href="#tymethod.from_slice_mut" class="fnname">from_slice_mut</a>(slice: &amp;mut [Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>]) -&gt; &amp;mut Self;
<span class="item-spacer"></span> fn <a href="#tymethod.to_rgb" class="fnname">to_rgb</a>(&amp;self) -&gt; <a class="struct" href="struct.Rgb.html" title="struct image::Rgb">Rgb</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.to_rgba" class="fnname">to_rgba</a>(&amp;self) -&gt; <a class="struct" href="struct.Rgba.html" title="struct image::Rgba">Rgba</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.to_luma" class="fnname">to_luma</a>(&amp;self) -&gt; <a class="struct" href="struct.Luma.html" title="struct image::Luma">Luma</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.to_luma_alpha" class="fnname">to_luma_alpha</a>(&amp;self) -&gt; <a class="struct" href="struct.LumaA.html" title="struct image::LumaA">LumaA</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.to_bgr" class="fnname">to_bgr</a>(&amp;self) -&gt; <a class="struct" href="struct.Bgr.html" title="struct image::Bgr">Bgr</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.to_bgra" class="fnname">to_bgra</a>(&amp;self) -&gt; <a class="struct" href="struct.Bgra.html" title="struct image::Bgra">Bgra</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.map" class="fnname">map</a>&lt;F&gt;(&amp;self, f: F) -&gt; Self<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a></span>;
<span class="item-spacer"></span> fn <a href="#tymethod.apply" class="fnname">apply</a>&lt;F&gt;(&amp;mut self, f: F)<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a></span>;
<span class="item-spacer"></span> fn <a href="#tymethod.map_with_alpha" class="fnname">map_with_alpha</a>&lt;F, G&gt;(&amp;self, f: F, g: G) -&gt; Self<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;G: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a></span>;
<span class="item-spacer"></span> fn <a href="#tymethod.apply_with_alpha" class="fnname">apply_with_alpha</a>&lt;F, G&gt;(&amp;mut self, f: F, g: G)<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;G: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a></span>;
<span class="item-spacer"></span> fn <a href="#tymethod.map2" class="fnname">map2</a>&lt;F&gt;(&amp;self, other: &amp;Self, f: F) -&gt; Self<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>, Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a></span>;
<span class="item-spacer"></span> fn <a href="#tymethod.apply2" class="fnname">apply2</a>&lt;F&gt;(&amp;mut self, other: &amp;Self, f: F)<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>, Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a></span>;
<span class="item-spacer"></span> fn <a href="#tymethod.invert" class="fnname">invert</a>(&amp;mut self);
<span class="item-spacer"></span> fn <a href="#tymethod.blend" class="fnname">blend</a>(&amp;mut self, other: &amp;Self);
fn <a href="#method.channel_count" class="fnname">channel_count</a>() -&gt; u8 { ... }
<span class="item-spacer"></span> fn <a href="#method.color_model" class="fnname">color_model</a>() -&gt; &amp;'static str { ... }
<span class="item-spacer"></span> fn <a href="#method.color_type" class="fnname">color_type</a>() -&gt; <a class="enum" href="enum.ColorType.html" title="enum image::ColorType">ColorType</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.map_without_alpha" class="fnname">map_without_alpha</a>&lt;F&gt;(&amp;self, f: F) -&gt; Self<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a></span>,
{ ... }
<span class="item-spacer"></span> fn <a href="#method.apply_without_alpha" class="fnname">apply_without_alpha</a>&lt;F&gt;(&amp;mut self, f: F)<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a></span>,
{ ... }
</details>}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A generalized pixel.</p>
<p>A pixel object is usually not used standalone but as a view into an image buffer.</p>
</div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="associatedtype.Subpixel" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#107">source</a><h4 class="code-header">type <a href="#associatedtype.Subpixel" class="associatedtype">Subpixel</a>: <a class="trait" href="trait.Primitive.html" title="trait image::Primitive">Primitive</a></h4></section></summary><div class="docblock"><p>The underlying subpixel type.</p>
</div></details></div><h2 id="required-associated-consts" class="small-section-header">Required Associated Constants<a href="#required-associated-consts" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="associatedconstant.CHANNEL_COUNT" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#110">source</a><h4 class="code-header">const <a href="#associatedconstant.CHANNEL_COUNT" class="constant">CHANNEL_COUNT</a>: u8</h4></section></summary><div class="docblock"><p>The number of channels of this pixel type.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="associatedconstant.COLOR_MODEL" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#125">source</a><h4 class="code-header">const <a href="#associatedconstant.COLOR_MODEL" class="constant">COLOR_MODEL</a>: &amp;'static str</h4></section></summary><div class="docblock"><p>A string that can help to interpret the meaning each channel
See <a href="http://gegl.org/babl/">gimp babl</a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="associatedconstant.COLOR_TYPE" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#134">source</a><h4 class="code-header">const <a href="#associatedconstant.COLOR_TYPE" class="constant">COLOR_TYPE</a>: <a class="enum" href="enum.ColorType.html" title="enum image::ColorType">ColorType</a></h4></section></summary><div class="docblock"><p>ColorType for this pixel format</p>
</div></details></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.channels" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#118">source</a><h4 class="code-header">fn <a href="#tymethod.channels" class="fnname">channels</a>(&amp;self) -&gt; &amp;[Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>]</h4></section></summary><div class="docblock"><p>Returns the components as a slice.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.channels_mut" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#121">source</a><h4 class="code-header">fn <a href="#tymethod.channels_mut" class="fnname">channels_mut</a>(&amp;mut self) -&gt; &amp;mut [Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>]</h4></section></summary><div class="docblock"><p>Returns the components as a mutable slice</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.channels4" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#145-152">source</a><h4 class="code-header">fn <a href="#tymethod.channels4" class="fnname">channels4</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self<br>) -&gt; (Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>, Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>, Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>, Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>)</h4></section></summary><div class="docblock"><p>Returns the channels of this pixel as a 4 tuple. If the pixel
has less than 4 channels the remainder is filled with the maximum value</p>
<p>TODO deprecate</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.from_channels" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#158-163">source</a><h4 class="code-header">fn <a href="#tymethod.from_channels" class="fnname">from_channels</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;a: Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;c: Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;d: Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><br>) -&gt; Self</h4></section></summary><div class="docblock"><p>Construct a pixel from the 4 channels a, b, c and d.
If the pixel does not contain 4 channels the extra are ignored.</p>
<p>TODO deprecate</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.from_slice" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#169">source</a><h4 class="code-header">fn <a href="#tymethod.from_slice" class="fnname">from_slice</a>(slice: &amp;[Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>]) -&gt; &amp;Self</h4></section></summary><div class="docblock"><p>Returns a view into a slice.</p>
<p>Note: The slice length is not checked on creation. Thus the caller has to ensure
that the slice is long enough to prevent panics if the pixel is used later on.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.from_slice_mut" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#175">source</a><h4 class="code-header">fn <a href="#tymethod.from_slice_mut" class="fnname">from_slice_mut</a>(slice: &amp;mut [Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>]) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Returns mutable view into a mutable slice.</p>
<p>Note: The slice length is not checked on creation. Thus the caller has to ensure
that the slice is long enough to prevent panics if the pixel is used later on.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.to_rgb" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#178">source</a><h4 class="code-header">fn <a href="#tymethod.to_rgb" class="fnname">to_rgb</a>(&amp;self) -&gt; <a class="struct" href="struct.Rgb.html" title="struct image::Rgb">Rgb</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;</h4></section></summary><div class="docblock"><p>Convert this pixel to RGB</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.to_rgba" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#181">source</a><h4 class="code-header">fn <a href="#tymethod.to_rgba" class="fnname">to_rgba</a>(&amp;self) -&gt; <a class="struct" href="struct.Rgba.html" title="struct image::Rgba">Rgba</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;</h4></section></summary><div class="docblock"><p>Convert this pixel to RGB with an alpha channel</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.to_luma" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#184">source</a><h4 class="code-header">fn <a href="#tymethod.to_luma" class="fnname">to_luma</a>(&amp;self) -&gt; <a class="struct" href="struct.Luma.html" title="struct image::Luma">Luma</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;</h4></section></summary><div class="docblock"><p>Convert this pixel to luma</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.to_luma_alpha" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#187">source</a><h4 class="code-header">fn <a href="#tymethod.to_luma_alpha" class="fnname">to_luma_alpha</a>(&amp;self) -&gt; <a class="struct" href="struct.LumaA.html" title="struct image::LumaA">LumaA</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;</h4></section></summary><div class="docblock"><p>Convert this pixel to luma with an alpha channel</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.to_bgr" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#190">source</a><h4 class="code-header">fn <a href="#tymethod.to_bgr" class="fnname">to_bgr</a>(&amp;self) -&gt; <a class="struct" href="struct.Bgr.html" title="struct image::Bgr">Bgr</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;</h4></section></summary><div class="docblock"><p>Convert this pixel to BGR</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.to_bgra" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#193">source</a><h4 class="code-header">fn <a href="#tymethod.to_bgra" class="fnname">to_bgra</a>(&amp;self) -&gt; <a class="struct" href="struct.Bgra.html" title="struct image::Bgra">Bgra</a>&lt;Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>&gt;</h4></section></summary><div class="docblock"><p>Convert this pixel to BGR with an alpha channel</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.map" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#196-198">source</a><h4 class="code-header">fn <a href="#tymethod.map" class="fnname">map</a>&lt;F&gt;(&amp;self, f: F) -&gt; Self<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,</span></h4></section></summary><div class="docblock"><p>Apply the function <code>f</code> to each channel of this pixel.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.apply" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#201-203">source</a><h4 class="code-header">fn <a href="#tymethod.apply" class="fnname">apply</a>&lt;F&gt;(&amp;mut self, f: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,</span></h4></section></summary><div class="docblock"><p>Apply the function <code>f</code> to each channel of this pixel.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.map_with_alpha" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#207-210">source</a><h4 class="code-header">fn <a href="#tymethod.map_with_alpha" class="fnname">map_with_alpha</a>&lt;F, G&gt;(&amp;self, f: F, g: G) -&gt; Self<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;G: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,</span></h4></section></summary><div class="docblock"><p>Apply the function <code>f</code> to each channel except the alpha channel.
Apply the function <code>g</code> to the alpha channel.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.apply_with_alpha" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#214-217">source</a><h4 class="code-header">fn <a href="#tymethod.apply_with_alpha" class="fnname">apply_with_alpha</a>&lt;F, G&gt;(&amp;mut self, f: F, g: G)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;G: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,</span></h4></section></summary><div class="docblock"><p>Apply the function <code>f</code> to each channel except the alpha channel.
Apply the function <code>g</code> to the alpha channel. Works in-place.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.map2" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#240-242">source</a><h4 class="code-header">fn <a href="#tymethod.map2" class="fnname">map2</a>&lt;F&gt;(&amp;self, other: &amp;Self, f: F) -&gt; Self<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>, Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,</span></h4></section></summary><div class="docblock"><p>Apply the function <code>f</code> to each channel of this pixel and
<code>other</code> pairwise.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.apply2" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#246-248">source</a><h4 class="code-header">fn <a href="#tymethod.apply2" class="fnname">apply2</a>&lt;F&gt;(&amp;mut self, other: &amp;Self, f: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>, Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,</span></h4></section></summary><div class="docblock"><p>Apply the function <code>f</code> to each channel of this pixel and
<code>other</code> pairwise. Works in-place.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.invert" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#251">source</a><h4 class="code-header">fn <a href="#tymethod.invert" class="fnname">invert</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Invert this pixel</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.blend" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#254">source</a><h4 class="code-header">fn <a href="#tymethod.blend" class="fnname">blend</a>(&amp;mut self, other: &amp;Self)</h4></section></summary><div class="docblock"><p>Blend the color of a given pixel into ourself, taking into account alpha channels</p>
</div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.channel_count" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#113-115">source</a><h4 class="code-header">fn <a href="#method.channel_count" class="fnname">channel_count</a>() -&gt; u8</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: please use CHANNEL_COUNT associated constant</span></div></span><div class="docblock"><p>Returns the number of channels of this pixel type.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.color_model" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#129-131">source</a><h4 class="code-header">fn <a href="#method.color_model" class="fnname">color_model</a>() -&gt; &amp;'static str</h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: please use COLOR_MODEL associated constant</span></div></span><div class="docblock"><p>Returns a string that can help to interpret the meaning each channel
See <a href="http://gegl.org/babl/">gimp babl</a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.color_type" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#137-139">source</a><h4 class="code-header">fn <a href="#method.color_type" class="fnname">color_type</a>() -&gt; <a class="enum" href="enum.ColorType.html" title="enum image::ColorType">ColorType</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: please use COLOR_TYPE associated constant</span></div></span><div class="docblock"><p>Returns the ColorType for this pixel format</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map_without_alpha" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#220-227">source</a><h4 class="code-header">fn <a href="#method.map_without_alpha" class="fnname">map_without_alpha</a>&lt;F&gt;(&amp;self, f: F) -&gt; Self<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,</span></h4></section></summary><div class="docblock"><p>Apply the function <code>f</code> to each channel except the alpha channel.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.apply_without_alpha" class="method has-srclink"><a class="srclink rightside" href="../src/image/traits.rs.html#231-236">source</a><h4 class="code-header">fn <a href="#method.apply_without_alpha" class="fnname">apply_without_alpha</a>&lt;F&gt;(&amp;mut self, f: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: FnMut(Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>) -&gt; Self::<a class="associatedtype" href="trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>,</span></h4></section></summary><div class="docblock"><p>Apply the function <code>f</code> to each channel except the alpha channel.
Works in place.</p>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Pixel-for-Bgr%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#impl-Pixel-for-Bgr%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.Primitive.html" title="trait image::Primitive">Primitive</a> + 'static&gt; <a class="trait" href="trait.Pixel.html" title="trait image::Pixel">Pixel</a> for <a class="struct" href="struct.Bgr.html" title="struct image::Bgr">Bgr</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Subpixel-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Subpixel-1" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Subpixel" class="associatedtype">Subpixel</a> = T</h4></section><section id="associatedconstant.CHANNEL_COUNT-1" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.CHANNEL_COUNT-1" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.CHANNEL_COUNT" class="constant">CHANNEL_COUNT</a>: u8 = 3u8</h4></section><section id="associatedconstant.COLOR_MODEL-1" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_MODEL-1" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_MODEL" class="constant">COLOR_MODEL</a>: &amp;'static str = &quot;BGR&quot;</h4></section><section id="associatedconstant.COLOR_TYPE-1" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_TYPE-1" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_TYPE" class="constant">COLOR_TYPE</a>: <a class="enum" href="enum.ColorType.html" title="enum image::ColorType">ColorType</a> = _</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Pixel-for-Bgra%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#impl-Pixel-for-Bgra%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.Primitive.html" title="trait image::Primitive">Primitive</a> + 'static&gt; <a class="trait" href="trait.Pixel.html" title="trait image::Pixel">Pixel</a> for <a class="struct" href="struct.Bgra.html" title="struct image::Bgra">Bgra</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Subpixel-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Subpixel-2" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Subpixel" class="associatedtype">Subpixel</a> = T</h4></section><section id="associatedconstant.CHANNEL_COUNT-2" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.CHANNEL_COUNT-2" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.CHANNEL_COUNT" class="constant">CHANNEL_COUNT</a>: u8 = 4u8</h4></section><section id="associatedconstant.COLOR_MODEL-2" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_MODEL-2" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_MODEL" class="constant">COLOR_MODEL</a>: &amp;'static str = &quot;BGRA&quot;</h4></section><section id="associatedconstant.COLOR_TYPE-2" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_TYPE-2" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_TYPE" class="constant">COLOR_TYPE</a>: <a class="enum" href="enum.ColorType.html" title="enum image::ColorType">ColorType</a> = _</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Pixel-for-Luma%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#impl-Pixel-for-Luma%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.Primitive.html" title="trait image::Primitive">Primitive</a> + 'static&gt; <a class="trait" href="trait.Pixel.html" title="trait image::Pixel">Pixel</a> for <a class="struct" href="struct.Luma.html" title="struct image::Luma">Luma</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Subpixel-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Subpixel-3" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Subpixel" class="associatedtype">Subpixel</a> = T</h4></section><section id="associatedconstant.CHANNEL_COUNT-3" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.CHANNEL_COUNT-3" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.CHANNEL_COUNT" class="constant">CHANNEL_COUNT</a>: u8 = 1u8</h4></section><section id="associatedconstant.COLOR_MODEL-3" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_MODEL-3" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_MODEL" class="constant">COLOR_MODEL</a>: &amp;'static str = &quot;Y&quot;</h4></section><section id="associatedconstant.COLOR_TYPE-3" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_TYPE-3" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_TYPE" class="constant">COLOR_TYPE</a>: <a class="enum" href="enum.ColorType.html" title="enum image::ColorType">ColorType</a> = _</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Pixel-for-LumaA%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#impl-Pixel-for-LumaA%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.Primitive.html" title="trait image::Primitive">Primitive</a> + 'static&gt; <a class="trait" href="trait.Pixel.html" title="trait image::Pixel">Pixel</a> for <a class="struct" href="struct.LumaA.html" title="struct image::LumaA">LumaA</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Subpixel-4" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Subpixel-4" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Subpixel" class="associatedtype">Subpixel</a> = T</h4></section><section id="associatedconstant.CHANNEL_COUNT-4" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.CHANNEL_COUNT-4" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.CHANNEL_COUNT" class="constant">CHANNEL_COUNT</a>: u8 = 2u8</h4></section><section id="associatedconstant.COLOR_MODEL-4" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_MODEL-4" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_MODEL" class="constant">COLOR_MODEL</a>: &amp;'static str = &quot;YA&quot;</h4></section><section id="associatedconstant.COLOR_TYPE-4" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_TYPE-4" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_TYPE" class="constant">COLOR_TYPE</a>: <a class="enum" href="enum.ColorType.html" title="enum image::ColorType">ColorType</a> = _</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Pixel-for-Rgb%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#impl-Pixel-for-Rgb%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.Primitive.html" title="trait image::Primitive">Primitive</a> + 'static&gt; <a class="trait" href="trait.Pixel.html" title="trait image::Pixel">Pixel</a> for <a class="struct" href="struct.Rgb.html" title="struct image::Rgb">Rgb</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Subpixel-5" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Subpixel-5" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Subpixel" class="associatedtype">Subpixel</a> = T</h4></section><section id="associatedconstant.CHANNEL_COUNT-5" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.CHANNEL_COUNT-5" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.CHANNEL_COUNT" class="constant">CHANNEL_COUNT</a>: u8 = 3u8</h4></section><section id="associatedconstant.COLOR_MODEL-5" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_MODEL-5" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_MODEL" class="constant">COLOR_MODEL</a>: &amp;'static str = &quot;RGB&quot;</h4></section><section id="associatedconstant.COLOR_TYPE-5" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_TYPE-5" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_TYPE" class="constant">COLOR_TYPE</a>: <a class="enum" href="enum.ColorType.html" title="enum image::ColorType">ColorType</a> = _</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Pixel-for-Rgba%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#impl-Pixel-for-Rgba%3CT%3E" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;<a class="trait" href="trait.Primitive.html" title="trait image::Primitive">Primitive</a> + 'static&gt; <a class="trait" href="trait.Pixel.html" title="trait image::Pixel">Pixel</a> for <a class="struct" href="struct.Rgba.html" title="struct image::Rgba">Rgba</a>&lt;T&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Subpixel-6" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Subpixel-6" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Subpixel" class="associatedtype">Subpixel</a> = T</h4></section><section id="associatedconstant.CHANNEL_COUNT-6" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.CHANNEL_COUNT-6" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.CHANNEL_COUNT" class="constant">CHANNEL_COUNT</a>: u8 = 4u8</h4></section><section id="associatedconstant.COLOR_MODEL-6" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_MODEL-6" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_MODEL" class="constant">COLOR_MODEL</a>: &amp;'static str = &quot;RGBA&quot;</h4></section><section id="associatedconstant.COLOR_TYPE-6" class="associatedconstant trait-impl has-srclink"><a class="srclink rightside" href="../src/image/color.rs.html#375-382">source</a><a href="#associatedconstant.COLOR_TYPE-6" class="anchor"></a><h4 class="code-header">const <a href="#associatedconstant.COLOR_TYPE" class="constant">COLOR_TYPE</a>: <a class="enum" href="enum.ColorType.html" title="enum image::ColorType">ColorType</a> = _</h4></section></div></details></div><script src="../implementors/image/traits/trait.Pixel.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="image" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>