« first day (746 days earlier)      last day (1721 days later) » 

3:56 AM
@MichaelHale It almost works fine (still a few artifacts but way less) when I changed all the RasterBoxes so their coordinates aren't "reversed" as in images.
reverse[data_?ArrayQ] := Reverse@data;
reverse[rar : HoldPattern@RawArray[type_, _]] :=
  RawArray[type, Reverse@Developer`FromRawArray@rar];
createPrintable[nb_NotebookObject] := NotebookPut[NotebookGet[nb] /.
     HoldPattern@RasterBox[data_, {{0, f_}, {c_, 0}}, rest__] :>
      With[{newData = reverse@data},
       RasterBox[newData, {{0, 0}, {c, f}}, rest] /; True]];
That was good enough for now
 
Good tip. I don't think I would have tried that.
 
@MichaelHale Me either. Spelunking led me there. I'm going to try and fix the MakeBoxing of Image for good
Module[{inside, reverse},
 Image;(* autoload *)
 reverse[data_?ArrayQ] := Reverse@data;
 reverse[rar : HoldPattern@RawArray[type_, _]] :=
  RawArray[type, Reverse@Developer`FromRawArray@rar];
 Unprotect[Image];
 PrependTo[FormatValues[Image],
  HoldPattern[mb : MakeBoxes[im_Image, fmt_] /; ! TrueQ[inside]] :>
   Block[{inside = True},
    mb /.
     HoldPattern@RasterBox[data_, {{0, f_}, {c_, 0}}, rest__] :>
      With[{newData = reverse@data},
       RasterBox[newData, {{0, 0}, {c, f}}, rest] /; True]
Time will tell if I get into trouble for this
 
4:26 AM
Looks good to me. I'll make a place to store user-implemented optimizations and bug fixes on Wikicode.
This page stores code for patches, bug fixes, and improvements for default Mathematica system functionality. (* fix RasterBox layout from Image to reduce printing artifacts *) Module[{inside, reverse}, Image;(* autoload *) reverse[data_?ArrayQ] := Reverse@data; reverse[rar : HoldPattern@RawArray[type_, _]] := RawArray[type, Reverse@Developer`FromRawArray@rar]; Unprotect[Image]; PrependTo[FormatValues[Image], HoldPattern[mb : MakeBoxes[im_Image, fmt_] /; ! TrueQ[inside]] :> Block[{inside = True}, mb /. HoldPattern@RasterBox[data_, {{0, f_}, {c_, 0}}, rest__] :> ...
 
 
4 hours later…
8:31 AM
@MichaelHale you forgot the Attribution required part of the SE code license when making that page.
 
 
7 hours later…
3:41 PM
There's also the issue of parsing it back properly
Perhaps it's better to add a tag box. Also, wrap it in some non global context
 
 
2 hours later…
5:45 PM
@SjoerdC.deVries Fixed
 
6:43 PM
@MichaelHale ;-)
 

« first day (746 days earlier)      last day (1721 days later) »