Comments (3)
Implemented the primitive in e20591b (for non-Spur images).
It's working correctly according to ImageSegment>>deepCopyTest:
.
However, while saving an Etoys project succeeds now, loading it back in still fails with an error. Since loading existing projects works fine, the problem must be in saving.
I assume there is a bug in writing the SmartRefStream
. This could be the same issue as mentioned in #146 (comment) where saving a Scratch Project works only if the sounds are removed.
The actual error happens when loading a Bitmap from the Etoys project's SmartRefStream
. I don't know the error in Scratch but sounds are related to binary objects too so that seems to be an area worth investigating.
from squeakjs.
The load error happens when the ImageSegment
's WordArrayForSegment
is read from the SmartRefStream
because there are not enough bytes. E.g. a project just containing an ellipse is written as a 6520 byte segment (i.e. the WordArray
created by storeImageSegment()
). But when loading it, the byteSize
is read correctly as 6520
but only 3269 bytes are available before the end of the stream.
That means for some reason, storing of the ImageSegment
's WordArray
in the SmartRefStream
failed, or maybe it was cut short when writing it to the zip (.pr
files are actually .zip
files containing the actual project and other files).
from squeakjs.
Fixed the file writing bug in d94aaed.
The segment is stored as words in the file but primitiveFileWrite took the word count as bytes so it only stored the first quarter of the segment.
Works in release 1.1.0.
from squeakjs.
Related Issues (20)
- Squeak 6.0 image format unknown HOT 2
- High-DPI not working HOT 9
- Primitive 218 doNamedPrimitiveWithArgs not implemented HOT 1
- Mouse fixed at top left in Firefox for Android HOT 3
- I succeeded in running squeakJS in the web browser. But, ... HOT 1
- I cant open my projects in scratch.js.org HOT 13
- Add file import button HOT 1
- Fix writing Scratch projects HOT 12
- Internet for Images? HOT 4
- File storage when added to Home Screen on iOS HOT 3
- Fix user interrupt (cmd-.) HOT 1
- Links dont work anymore HOT 5
- Old 0.x Scratch don't detect key presses HOT 1
- Accessing the microphone freezes Scratch HOT 1
- Simple JIT for SISTA bytecodes
- Built-in primitives do not use proper error codes HOT 1
- Onscreen keyboard is broken HOT 2
- iOS: keyboard breaks when sliding on space bar HOT 1
- Invalid keyboard events HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from squeakjs.