Re: Undocumented functions for working with graphics
- To: mathgroup at smc.vnet.net
- Subject: [mg100712] Re: Undocumented functions for working with graphics
- From: David Reiss <dbreiss at gmail.com>
- Date: Thu, 11 Jun 2009 21:41:48 -0400 (EDT)
- References: <h0qogh$kkq$1@smc.vnet.net>
...just following up on the method for reverse engineering of my previous post, here is part of the code for ToGraphicsRaster obtained using that approach: Image`ToGraphicsRaster[img_?Image`ValidImageQ] := Module[{width, height, range, cf, data, interleaving, imsize}, {{width, height}, range, cf} = ImageData[ img, {ImageDimensions, DataRange, ColorFunction}]; {interleaving, imsize} = {Interleaving, ImageSize} /. Options[img] /. Options[Image]; If[interleaving === False, data = Reverse[ImageData[img, Interleaving -> True]], data = Reverse[First[img]]]; "Graphics"[ Raster[data, {{0, 0}, {width, height}}, range, ColorFunction -> cf], If[imsize === Automatic || imsize === All, ImageSize -> {width, height}, ImageSize -> imsize], PlotRange -> {{0, width}, {0, height}}]] On Jun 11, 7:06 am, Alexey <lehi... at gmail.com> wrote: > Hello, > > Does anyone know where such functions as "Image`ToGraphicsRaster" and > "Image`PossibleImageQ" are documented. Are there other such built-in > functions? At this moment I even can't imagine from where (except this > group) I could learn that functions mentioned exist...