Skip to content

Commit

Permalink
fix: GifWriter using wrong constant for frame delay
Browse files Browse the repository at this point in the history
---

Fixes #15

Signed-off-by: AterAnimAvis <[email protected]>
  • Loading branch information
AterAnimAvis committed Jan 10, 2021
1 parent a567171 commit f5f28c2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@NonnullDefault
package com.unascribed.blockrenderer.render;

import org.lwjgl.system.NonnullDefault;
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ public class GifWriter implements Closeable {
protected ImageWriteParam parameters;
protected IIOMetadata metadata;

public GifWriter(ImageOutputStream stream, int delayMS, boolean loop) throws IOException {
public GifWriter(ImageOutputStream stream, int fps, boolean loop) throws IOException {
writer = getGifWriter();
parameters = writer.getDefaultWriteParam();

ImageTypeSpecifier specifier = ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_ARGB);
metadata = writer.getDefaultImageMetadata(specifier, parameters);

setupMetadata(metadata, delayMS, loop);
setupMetadata(metadata, 1000 / fps, loop);

writer.setOutput(stream);
writer.prepareWriteSequence(null);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@NonnullDefault
package com.unascribed.blockrenderer.fabric.mixin.accessor;

import org.lwjgl.system.NonnullDefault;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@NonnullDefault
package com.unascribed.blockrenderer.fabric.mixin;

import org.lwjgl.system.NonnullDefault;

0 comments on commit f5f28c2

Please sign in to comment.