Baseflow / Baseflow/screenrecorder

error while exporting gif

Open
#46 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
77
Forks
35
PR merge metrics
No merged PRs in 30d

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Package/Plugin version

0.3.0

### Platforms

- [ ] Android
- [X] iOS
- [ ] Linux
- [ ] MacOS
- [ ] Web
- [ ] Windows

### Flutter doctor

[✓] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79 darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.92.2)
[✓] Connected device (5 available)
[✓] Network resources

• No issues found!

### Minimal code example

var gif = await controller.exporter.exportGif();
if (gif == null) {
throw Exception();
}

### Current Behavior

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError (length): Invalid value: Not in inclusive range 0..255: 65423
#0 Int32List.[] (dart:typed_data-patch/typed_data_patch.dart)
#1 NeuralQuantizer._inxSearch (package:image/src/util/neural_quantizer.dart:141:22)
#2 NeuralQuantizer.getColorIndex (package:image/src/util/neural_quantizer.dart:68:12)
#3 Quantizer.getIndexImage (package:image/src/util/quantizer.dart:36:14)
#4 ditherImage (package:image/src/filter/dither_image.dart:69:22)
#5 quantize (package:image/src/filter/quantize.dart:26:10)
#6 Exporter._encodeGifWIthTransparency (package:screen_recorder/src/exporter.dart:109:28)
#7 Exporter._exportGif (package:screen_recorder/src/exporter.dart:79:9)

### Expected Behavior

it should generate the gif like in android

### Steps To Reproduce

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError (length): Invalid value: Not in inclusive range 0..255: 65423
#0 Int32List.[] (dart:typed_data-patch/typed_data_patch.dart)
#1 NeuralQuantizer._inxSearch (package:image/src/util/neural_quantizer.dart:141:22)
#2 NeuralQuantizer.getColorIndex (package:image/src/util/neural_quantizer.dart:68:12)
#3 Quantizer.getIndexImage (package:image/src/util/quantizer.dart:36:14)
#4 ditherImage (package:image/src/filter/dither_image.dart:69:22)
#5 quantize (package:image/src/filter/quantize.dart:26:10)
#6 Exporter._encodeGifWIthTransparency (package:screen_recorder/src/exporter.dart:109:28)
#7 Exporter._exportGif (package:screen_recorder/src/exporter.dart:79:9)

### Aditional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.