PAINTROID-761-4: Integrate legacy image parser to app and handle fallback cases - #174
Open
Amit-Matth wants to merge 8 commits into
Open
PAINTROID-761-4: Integrate legacy image parser to app and handle fallback cases#174Amit-Matth wants to merge 8 commits into
Amit-Matth wants to merge 8 commits into
Conversation
Amit-Matth
marked this pull request as draft
July 9, 2026 01:26
Amit-Matth
force-pushed
the
PAINTROID-761-parser-fixes
branch
2 times, most recently
from
July 13, 2026 15:34
8cbfa8d to
0fb3258
Compare
Amit-Matth
marked this pull request as ready for review
July 13, 2026 15:57
…lizers from binary
… modern Flutter equivalents
Amit-Matth
force-pushed
the
PAINTROID-761-parser-fixes
branch
from
July 19, 2026 15:18
b6bdca6 to
9e08bfd
Compare
Amit-Matth
marked this pull request as draft
July 21, 2026 05:41
Amit-Matth
marked this pull request as ready for review
July 28, 2026 15:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request corresponds to Stage 4 of our backward compatibility integration. It focuses on connecting the legacy model parsing engine to the application's file loader, ensuring robust fallback recovery for corrupted or truncated files, and aligning the deserialization with the Kryo 5.5.0 specification.
PAINTROID-761
New Features and Enhancements
LoadImageFromFileManagerto explicitly support.catrobatand.bin(legacycatrobat-image) file extensions, routing them directly through theCatrobatImage.fromBytesparsing engine.legacy_model_parser.dartwhere the commands list size was incorrectly parsed using variable length checks, causing parsing errors on files withint32matching native Paintroid's serializer format.LoadCommand(class ID 20) and transforming it into a modernClipboardCommandat originOffset.zerowith scale1.0.CatrobatImage.fromByteswhere thehasUnsupportedCommandsflag value was lost. Users are now correctly notified via a Toast warning when unsupported legacy operations (such as the Smudge tool) are safely bypassed.appBarProviderstate updates inloadFromFilesand_loadFromPhotosinsideio_handler.dartto trigger UI updates immediately when commands are loaded.!reader.hasRemainingsafeguard inlegacy_model_parser.dartto prevent app crashes when loading.catrobat-imagefiles that were corrupted or cut off early by the legacy Android app. The parser now gracefully stops and recovers whatever strokes were successfully saved before the EOF.VarInts for generic object sizes, but Paintroid wrote explicit 4-byteInt32s for path actions and colors. Updated the parser to properly consume absolute 4-byte integers for these collections.Refactorings and Bug Fixes
printstatements from the codebase to align with strict clean coding and contributing guidelines.matchedHeaderincatrobat_image.dart) to ensure the codebase is free of compiler or static analysis warnings.kryo_reader_test.dartto match correct Kryo 5.5.0 string specification formats.Checklist
Your checklist for this pull request
Please review the contributing guidelines and wiki pages of this repository.