Skip to content

Commit 0defb0f

Browse files
committed
Fix images with alpha
1 parent e3a598a commit 0defb0f

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

Setup/setup.aip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
1313
<ROW Property="ARPNOREPAIR" Value="1"/>
1414
<ROW Property="Manufacturer" Value="Fidifis"/>
15-
<ROW Property="ProductCode" Value="1033:{2BE73AA6-E6C4-4311-A78F-685CE9A57418} " Type="16"/>
15+
<ROW Property="ProductCode" Value="1033:{1278E4CE-1455-4F2A-9E56-8B5DE07A27B7} " Type="16"/>
1616
<ROW Property="ProductLanguage" Value="1033"/>
1717
<ROW Property="ProductName" Value="TextureMerge"/>
18-
<ROW Property="ProductVersion" Value="1.4.1" Options="4"/>
18+
<ROW Property="ProductVersion" Value="1.4.2" Options="4"/>
1919
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
2020
<ROW Property="UpgradeCode" Value="{C6BCFED9-578D-4E43-8345-740156903ECA}"/>
2121
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>

TextureMerge/Merge/Merge.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,16 +362,13 @@ public void LoadChannel(string path, Channel channelSlot, Channel channelSource)
362362
throw new ArgumentException("Alpha can't be source channel");
363363

364364

365-
var source = new TMImage(new MagickImage(path), Path.GetFileName(path));
365+
var source = new TMImage(new MagickImage(path), Path.GetFileName(path)) ?? throw new ArgumentException("Failed to load image");
366+
367+
source.Image.Alpha(AlphaOption.Off);
366368
source.Image.ColorType = ColorType.TrueColor;
367369
source.Image.AutoOrient();
368370
source.Image.ColorSpace = ColorSpace.sRGB;
369371

370-
if (source is null)
371-
throw new ArgumentException("Failed to load image");
372-
373-
source.Image.Alpha(AlphaOption.Off);
374-
375372
switch (channelSlot)
376373
{
377374
case Channel.Red:

TextureMerge/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// Můžete zadat všechny hodnoty nebo nastavit výchozí číslo buildu a revize
5252
// pomocí zástupného znaku * takto:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.4.1")]
55-
[assembly: AssemblyFileVersion("1.4.1")]
54+
[assembly: AssemblyVersion("1.4.2")]
55+
[assembly: AssemblyFileVersion("1.4.2")]

0 commit comments

Comments
 (0)