2010/5/16 Mariano Martinez Peck
<marianopeck@gmail.com>
OMG. WHAT A HACK!!!!��� but works hahahah. I cannot believe such thing could work...but in fact, it does!
It is sad this cannot be done with Smalltalk, just evaluating something in the image.
? Why do you assume it can't be done in Smalltalk?
shrinkDisplayInImageFile: imageFileName
�� � � �| fs |
�� � � �fs := StandardFileStream fileNamed: imageFileName.
�� � � �fs binary.
�� � � �[fs position: 24.
�� � � � SmalltalkImage current isLittleEndian
�� � � � � � � �ifTrue:
�� � � � � � � � � � � �[fs nextLittleEndianNumber: 4 put: (1024 bitShift: 16) + 768. "Display size"
�� � � � � � � � � � � � fs nextLittleEndianNumber: 4 put: 0. "full-screen flag (off)"]
�� � � � � � � �ifFalse:
�� � � � � � � � � � � �[self error: 'not yet implemented']]
�� � � � � � � �ensure: [fs close]! !
�
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project