notscuffed / repkg

Wallpaper engine PKG extractor/TEX to image converter
MIT License
2.01k stars 219 forks source link

.TEX file will not convert, citing Crop error #18

Open CaptainTologist opened 3 years ago

CaptainTologist commented 3 years ago

The output of the program is this:

System.ArgumentException: Crop rectangle should be smaller than the source bounds.
Parameter name: cropRectangle
    at SixLabors.Guard.ThrowArgumentException(String message, String parameterName)
    at SixLabors.ImageSharp.Processing.Processors.Transforms.CropProcessor..ctor(Rectangle cropRectangle, Size sourceSize)
    at SixLabors.ImageSharp.Processing.CropExtensions.Crop(IImageProcessingContext source, Rectangle cropRectangle)
    at RePKG.Application.Texture.TexToImageConverter.<>c__DisplayClass2_0.<ConvertToGif>b__0(IImageProcessingContext context)
    at SixLabors.ImageSharp.Processing.ProcessingExtensions.ProcessingVisitor.Visit[TPixel](Image1` image)
    at SixLabors.ImageSharp.Processing.ProcessingExtensions.Clone(Image source, Action`1 operation)
    at RePKG.Application.Texture.TexToImageConverter.ConvertToGif(ITex tex)
    at RePKG.Command.Extract.ConvertToImageAndSave(ITex tex, String path, Boolean overwrite)
    at RePKG.Command.Extract.ExtractFile(FileInfo fileInfo)
Done

This happens when trying to convert the leaves1.tex file from the default wallpaper engine assets.

I'm including the file just in case my files are different (github does not support .tex files, so I renamed it to a .txt file). leaves1.tex.txt

Cronosus commented 2 years ago

i have this error SixLabors.ImageSharp.ImageProcessingException: An error occurred when processing the image using CropProcessor1. See the inner exception for more detail. ---> System.ArgumentOutOfRangeException: Value 0 must be greater than 0. Název parametru: width v SixLabors.Guard.ThrowArgumentOutOfRangeException(String parameterName, String message) v SixLabors.ImageSharp.ImageFrame1..ctor(Configuration configuration, Int32 width, Int32 height, ImageFrameMetadata metadata) v SixLabors.ImageSharp.Processing.Processors.Transforms.CropProcessor1.b4_0(ImageFrame1 x) v System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() v System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source) v SixLabors.ImageSharp.Image1.ValidateFramesAndGetSize(IEnumerable1 frames) v SixLabors.ImageSharp.Image1..ctor(Configuration configuration, ImageMetadata metadata, IEnumerable1 frames) v SixLabors.ImageSharp.Processing.Processors.Transforms.CropProcessor1.CreateDestination() v SixLabors.ImageSharp.Processing.Processors.CloningImageProcessor1.CloneAndApply() --- Konec trasování zásobníku pro vnitřní výjimku --- v SixLabors.ImageSharp.Processing.Processors.CloningImageProcessor1.CloneAndApply() v SixLabors.ImageSharp.Processing.DefaultImageProcessorContext1.ApplyProcessor(IImageProcessor processor, Rectangle rectangle) v SixLabors.ImageSharp.Processing.DefaultImageProcessorContext1.ApplyProcessor(IImageProcessor processor) v SixLabors.ImageSharp.Processing.CropExtensions.Crop(IImageProcessingContext source, Rectangle cropRectangle) v RePKG.Application.Texture.TexToImageConverter.<>c__DisplayClass2_0.b0(IImageProcessingContext context) v SixLabors.ImageSharp.Processing.ProcessingExtensions.ProcessingVisitor.Visit[TPixel](Image1 image) v SixLabors.ImageSharp.Processing.ProcessingExtensions.Clone(Image source, Action1 operation) v RePKG.Application.Texture.TexToImageConverter.ConvertToGif(ITex tex) v RePKG.Command.Extract.ConvertToImageAndSave(ITex tex, String path, Boolean overwrite) v RePKG.Command.Extract.ExtractEntry(PackageEntry entry, String& outputDirectory) Done`

deviltornado commented 1 year ago

I have the same problem. Same file Hope it can be solved `PS E:\Tools\WallpaperEngineRePKG\Repkg> .\repkg extract -t -s E:\Tools\WallpaperEngineRePKG\Repkg\source