<div dir="ltr"><div>Note that Graphics-jdr.176 also contained a fix for Form>>asGrayScale because current version does not correctly preserve transparency.<br></div>The proposed fix did not seem to preserve it better, thus I placed th mcz in treated inbox.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-17 22:49 GMT+02:00 <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Nicolas Cellier uploaded a new version of Graphics to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Graphics-nice.293.mcz" target="_blank">http://source.squeak.org/trunk/Graphics-nice.293.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Graphics-nice.293<br>
Author: nice<br>
Time: 17 May 2014, 10:49:09.105 pm<br>
UUID: adb6fa29-fffc-4ec4-ab16-77ff98702aca<br>
Ancestors: Graphics-nice.292<br>
<br>
Merge Graphics-jdr.177 rotting in inbox since 21 January 2011: added pgm extension.<br>
While at it, simplify cleanLine (it can now answer nil, but sole sender is protected).<br>
<br>
=============== Diff against Graphics-nice.292 ===============<br>
<br>
Item was changed:<br>
----- Method: PNMReadWriter class>>typicalFileExtensions (in category 'image reading/writing') -----<br>
typicalFileExtensions<br>
"Answer a collection of file extensions (lowercase) which files that I can read might commonly have"<br>
+ ^#('pbm' 'pgm' 'pnm' 'ppm' 'pam')!<br>
- ^#('pbm' 'pnm' 'ppm' 'pam')!<br>
<br>
Item was changed:<br>
----- Method: PNMReadWriter>>cleanLine (in category 'reading') -----<br>
cleanLine<br>
"upTo LF or CR, tab as space"<br>
<br>
+ ^stream nextLine ifNotNil: [:line | line replaceAll: Character tab with: Character space]!<br>
- | line loop b |<br>
- line := WriteStream with: ''.<br>
- loop := true.<br>
- [loop] whileTrue: [<br>
- b := stream next.<br>
- b ifNil:[<br>
- loop := false "EOS"<br>
- ]<br>
- ifNotNil: [<br>
- (b = (Character cr) or:[b = Character lf]) ifTrue:[<br>
- loop := false.<br>
- ]<br>
- ifFalse:[<br>
- b = (Character tab) ifTrue:[b := Character space].<br>
- line nextPut: b.<br>
- ]<br>
- ]<br>
- ].<br>
- ^line contents!<br>
<br>
<br>
</blockquote></div><br></div>