Skip to content

Commit

Permalink
with working cts atleast..
Browse files Browse the repository at this point in the history
  • Loading branch information
trackd committed Nov 22, 2024
1 parent 5c5ae0e commit 41c8cbb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 38 deletions.
14 changes: 0 additions & 14 deletions module/Sixel.Types.ps1xml

This file was deleted.

40 changes: 20 additions & 20 deletions module/Sixel.format.ps1xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<Configuration>
<ViewDefinitions>
<View>
<Name>Sixel.Terminal.Models.SixelGif</Name>
<ViewSelectedBy>
<TypeName>Sixel.Terminal.Models.SixelGif</TypeName>
</ViewSelectedBy>
<CustomControl>
<CustomEntries>
<CustomEntry>
<CustomItem>
<ExpressionBinding>
<ScriptBlock>
$_.ToString()
<ViewDefinitions>
<View>
<Name>Sixel.Terminal.Models.SixelGif</Name>
<ViewSelectedBy>
<TypeName>Sixel.Terminal.Models.SixelGif</TypeName>
</ViewSelectedBy>
<CustomControl>
<CustomEntries>
<CustomEntry>
<CustomItem>
<ExpressionBinding>
<ScriptBlock>
$_ | Show-SixelGif
</ScriptBlock>
</ExpressionBinding>
</CustomItem>
</CustomEntry>
</CustomEntries>
</CustomControl>
</View>
</ViewDefinitions>
</ExpressionBinding>
</CustomItem>
</CustomEntry>
</CustomEntries>
</CustomControl>
</View>
</ViewDefinitions>
</Configuration>
2 changes: 1 addition & 1 deletion module/Sixel.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
CmdletsToExport = @('ConvertTo-Sixel', 'New-SixelGif','Show-SixelGif')
AliasesToExport = @('cts', 'ConvertTo-InlineImage')
FormatsToProcess = @('Sixel.format.ps1xml')
TypesToProcess = @('Sixel.Types.ps1xml')
TypesToProcess = @()
PrivateData = @{
PSData = @{
Tags = @(
Expand Down
5 changes: 2 additions & 3 deletions src/Sixel/Protocols/gif.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ namespace Sixel.Protocols;
public static class GifToSixel {
public static SixelGif LoadGif(Stream imageStream, int maxColors, int cellWidth, int LoopCount)
{
var image = Image.Load<Rgba32>(imageStream);
var gif = ConvertGifToSixel(image, maxColors, cellWidth, LoopCount);
return gif;
using var image = Image.Load<Rgba32>(imageStream);
return ConvertGifToSixel(image, maxColors, cellWidth, LoopCount);
}
private static SixelGif ConvertGifToSixel(Image<Rgba32> image, int maxColors, int cellWidth, int LoopCount)
{
Expand Down

0 comments on commit 41c8cbb

Please sign in to comment.