<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Конвертация ARGB в RGB]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11098&amp;type=atom" />
	<updated>2015-11-22T18:02:17Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11098</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертация ARGB в RGB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99223#p99223" />
			<content type="html"><![CDATA[<p>Просто на битовые операции тратится предельно мало ресурсов.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-11-22T18:02:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99223#p99223</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертация ARGB в RGB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99222#p99222" />
			<content type="html"><![CDATA[<p>Да, так быстрее чем в первом посте аж в полтора раза, хотя казалось бы тоже самое.<br /></p><div class="codebox"><pre><code>Format(&quot;0x{:06X}&quot;, ARGB &amp; 0xFFFFFF)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-11-22T17:59:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99222#p99222</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертация ARGB в RGB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99220#p99220" />
			<content type="html"><![CDATA[<p>Тогда без форматирования строки не обойтись:<br /></p><div class="codebox"><pre><code>ARGB := 0xee0000ab

MsgBox % Format(&quot;0x{:06X}&quot;, ARGB &amp; 0xFFFFFF)
; или
MsgBox % Format(&quot;{:#08x}&quot;, ARGB &amp; 0xFFFFFF)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-11-22T17:48:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99220#p99220</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертация ARGB в RGB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99219#p99219" />
			<content type="html"><![CDATA[<p>Хотелось бы возвращать именно ввиде &quot;RGB&quot;, то есть из:</p><div class="codebox"><pre><code>0xff000001</code></pre></div><p>вернуть не 0x1, а 0x000001.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-11-22T17:30:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99219#p99219</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертация ARGB в RGB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99218#p99218" />
			<content type="html"><![CDATA[<p>Если задача освободиться от старшего байта, то так:<br /></p><div class="codebox"><pre><code>ARGB := 0xeeabcdef
SetFormat, IntegerFast, H
MsgBox, % &quot;RGB = &quot; 0xFFFFFF &amp; ARGB</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-11-22T17:22:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99218#p99218</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Конвертация ARGB в RGB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99217#p99217" />
			<content type="html"><![CDATA[<p>Опишите, пожалуйста, по-русски название темы и её суть.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2015-11-22T17:20:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99217#p99217</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Конвертация ARGB в RGB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99216#p99216" />
			<content type="html"><![CDATA[<p>Сделал такой вариант:<br /></p><div class="codebox"><pre><code>ARGB := 0xeeabcdef

MsgBox % RGBFromARGB(ARGB)
  
RGBFromARGB(ARGB)  {    
	Return &quot;0x&quot; SubStr(Format(&quot;{:08x}&quot;, ARGB), 3)
}</code></pre></div><p>Но думаю, что есть более производительные варианты.</p><p>Видел например такое:</p><div class="codebox"><pre><code>ARGBtoRGB( ARGB )
    {
        VarSetCapacity( RGB,6,0 )
        DllCall( &quot;msvcrt.dll\sprintf&quot;, Str,RGB, Str,&quot;%06X&quot;, UInt,ARGB&lt;&lt;8 )
        Return &quot;0x&quot; RGB
    }</code></pre></div><p>Но не работает.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-11-22T17:16:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99216#p99216</id>
		</entry>
</feed>
