The transcript is the log of session interaction, which is generated as HTML in J701 web interface.
Currently there are two ways to show images: an inline ASCII art for viewmat and external PDF for plot. It would be good to display bitmap images inline, such as PNG. == Inline Images == One approach, which was considered, is not recommended: using the data URI scheme http://en.wikipedia.org/wiki/Data_URI_scheme although it is seems attractive, because it provides inline image and a single file transcript, the disadvantage is that each image is several tens of KB, and the overall transcript with a few images would be several hundreds of KB, which has to loaded every time it is refreshed; while the browser cannot take advantage of caching images. == Separate Images == The recommended approach is to use regular images in HTML: <img src="img/XXX-YYY.png" > where XXX is session ID and YYY is sequential image number in the session. These should be cleared at end of session. This makes transcript very small; browser can cache the images; transcript together with images can be saved as regular HTML with resources; they can also be used as input to Publish addon to produce PDF of the transcript. Besides images this can be used to embed vector graphics (SVG, VML) or produce PDF or PS "attachement" with thumbnail. The media/platimg addon can produce PNG from bitmaps and is readily applicable to viewmat or OpenGL; and there has been some work done to emulate the gl2 verbs for things like plot or isigraph. == Note about Image Size == It happens that Courier New at 10pt takes 640 pixels to fill a line of 80 characters. So it would be good to use 640 pixels as a maximum width of image in transcript. If image is greater than 640 pixels, its power of 2 downscale less than 1280 is used, and <img width="50%"> is applied to fit on the page. Clicking the image will open it in a new window full downscaled size. pwr2=: (0 >. >.)&.(2&^.)@%~ 640 1280 (] , pwr2 ,: ] % pwr2)"0 1] 100 1000 2000 3000 100 1000 2000 3000 1 2 4 8 100 500 500 375 100 1000 2000 3000 1 1 2 4 100 1000 1000 750 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
