You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AvaGui/ViewModels/SubObjectTypes/ImageTableViewModel.cs
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -216,19 +216,23 @@ public async Task ImportImages()
216
216
});
217
217
218
218
varsortedH=sorted.ToImmutableHashSet();
219
-
if(G1Provider.G1Elements.Count!=sortedH.Count)
220
-
{
221
-
thrownewArgumentOutOfRangeException($"Directory doesn't contain the same number of images as expected Directory={sortedH.Count} Expected={G1Provider.G1Elements.Count}");
222
-
}
223
219
224
220
varg1Elements=newList<G1Element32>();
225
221
vari=0;
226
222
foreach(varfileinsorted)
227
223
{
228
224
varimg=Image.Load<Rgba32>(file);
229
225
Images[i]=img;
230
-
varcurrG1=G1Provider.G1Elements[i++];
231
-
currG1.ImageData=PaletteMap.ConvertRgba32ImageToG1Data(img,currG1.Flags);// simply overwrite existing pixel data
226
+
varcurrG1=G1Provider.G1Elements[i];
227
+
currG1=currG1with
228
+
{
229
+
Width=(int16_t)img.Width,
230
+
Height=(int16_t)img.Height,
231
+
Flags=currG1.Flags&~G1ElementFlags.IsRLECompressed,// SawyerStreamWriter::SaveImageTable does this anyways
0 commit comments