Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Ratzsch Newsgroups: comp.graphics.apps.gnuplot Subject: Re: plotting an adaptive mesh Date: Tue, 17 Jan 2017 15:25:34 +0100 Organization: solani.org Lines: 32 Message-ID: References: <32edf6eb-702a-403c-96c5-53cc44102fae@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1484663135 24193 eJwNyMEBwEAEBMCWuNtFykHov4RknsNrau0wGrhcQU4HFOlHCPORlWf/p/dbepGnaFsRU1XzARE1EVY= (17 Jan 2017 14:25:35 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Tue, 17 Jan 2017 14:25:35 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 X-User-ID: eJwFwQEBACAIA7BKoudAnaP0j+Dmh8YO0Akfn5VBCps1kqetrta+ZUCKL1+VNRSHUTdMHwulEI4= In-Reply-To: <32edf6eb-702a-403c-96c5-53cc44102fae@googlegroups.com> Cancel-Lock: sha1:S4/ubAEiCB4zQDfz1ZQ8a0JDTM0= X-NNTP-Posting-Host: eJwFwQkBwDAIA0BLDSMEOx2Pfwm94xeIkgfDudydoUfBDKbfAO1xHHpfqlORdzIbBTkIewljEAY= Xref: csiph.com comp.graphics.apps.gnuplot:3536 Am 17.01.2017 um 15:05 schrieb maierd83@gmail.com: >> svg is the _wrong_ format to plot a bitmap. It takes up 30 or 40 >> bytes _for every pixel_! Use jpeg or png. This will already speed >> up the task. > > Ok. I tried (my new idea, see below) with png and indeed the output > is smaller. I am not sure if I understand this. I thought that svg > saves a rectangle with position of two diagonal sides, and some > parameters like fillstyle, fillcolor.... while pixel graphics save > each pixel with position and color and if the rectangle consists of > 1000 pixels it saves this 1000-times. Obviously png does not use such > a raw format. > png is a compressed bitmap stream. It simply saves the dimensions of the whole picture (height x width), and then the colour information of each successive point, left to right, top to bottom. The position of each pixel is totally redundant and not saved. In truecolor, before compression, that's three bytes per pixel. Look once into a svg file, this is a text file, meant for vector graphics. Every pixel (=a four corner polygon) is a whole line of text: If your data comes from a self-written C program, why don't you just let it write a binary data stream of the expanded picture, and pipe that into gnuplot? Check "help binary matrix".