<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Склеить фото]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14706&amp;type=atom" />
	<updated>2019-04-11T09:10:37Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14706</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Склеить фото]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133499#p133499" />
			<content type="html"><![CDATA[<p><a href="https://www.dropbox.com/s/0e9gdfetbfa8v0o/Gdip_All.ahk">Gdip_All.ahk</a>.<br /></p><div class="codebox"><pre><code>#SingleInstance, Force
#NoEnv
#Include &lt;GDIP_All&gt;
pToken := Gdip_Startup()
OnExit, Exit

sFile1 = 1.jpeg
sFile2 = 2.png
sFileRes = 3.jpeg

pBitmap1 := Gdip_CreateBitmapFromFile(sFile1)
Gdip_GetImageDimensions(pBitmap1, Width, Height)

pResultBitmap := Gdip_CreateBitmap(Width, Height)
G := Gdip_GraphicsFromImage(pResultBitmap)
Gdip_SetInterpolationMode(G, 7)

Gdip_DrawImage(G, pBitmap1, 0, 0, Width, Height, 0, 0, Width, Height) 
Gdip_DisposeImage(pBitmap1)

pBitmap2 := Gdip_CreateBitmapFromFile(sFile2)
Gdip_GetImageDimensions(pBitmap2, Width2, Height2)

X := (Width - Width2) // 2
Y := (Height - Height2) // 2

Gdip_DrawImage(G, pBitmap2, X, Y, Width2, Height2, 0, 0, Width2, Height2) 
Gdip_DisposeImage(pBitmap2)

Gdip_DeleteGraphics(G)

Gdip_SaveBitmapToFile(pResultBitmap, sFileRes)
Gdip_DisposeImage(pResultBitmap)
Run %sFileRes%  

Exit: 
	Gdip_Shutdown(pToken)
	ExitApp </code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-04-11T09:10:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133499#p133499</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Склеить фото]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133496#p133496" />
			<content type="html"><![CDATA[<p>Что за троллинг, простейшая вещь в GDI+, какие нафиг скриншоты.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2019-04-10T17:42:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133496#p133496</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Склеить фото]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133495#p133495" />
			<content type="html"><![CDATA[<p>Насчёт прозрачности не соглашусь. Может и не умеет грамотно сохранять с прозрачностью, но может держать в буфере рисунок, содержащий прозрачность. Там ещё различается &quot;выделение&quot; и &quot;прозрачное выделение&quot;. А в конечном результате (3.jpeg) сохранять с прозрачностью и не требовалось.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2019-04-10T17:35:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133495#p133495</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Склеить фото]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133493#p133493" />
			<content type="html"><![CDATA[<p>Берёте в буфер 2.png.</p><p>1) Открываете в Paint&#039;е 1.jpeg<br />2) Посылаете ^V<br />3) Посылаете ^S<br />4) Посылаете !F4<br />5) Ждёте закрытия окна Paint</p><p> Открываете в Paint&#039;е 2.jpeg... и так далее</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2019-04-10T16:12:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133493#p133493</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Склеить фото]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133477#p133477" />
			<content type="html"><![CDATA[<p>Есть люди которые встречались с подобными задачами?<br />Может Bat/cmd прикрутить как то?</p>]]></content>
			<author>
				<name><![CDATA[wladkokopops]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34240</uri>
			</author>
			<updated>2019-04-10T06:34:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133477#p133477</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Склеить фото]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=133470#p133470" />
			<content type="html"><![CDATA[<p>Возникла потребность склеть два фото в одно,<br />первое фото должно быть 1.jpeg,второе же 2.png(прозрачный ватермарк).<br />Как это сделать посредством AHK , даже не имею понятия, есть идеи?</p><p>UPD: Второе фото должно наложится на первое и вывести результат в 3.jpeg.</p>]]></content>
			<author>
				<name><![CDATA[wladkokopops]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34240</uri>
			</author>
			<updated>2019-04-10T04:32:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=133470#p133470</id>
		</entry>
</feed>
