Ethan A Merritt wrote:
> On Thursday 29 December 2005 12:30 pm, you wrote:
>>No doubt. However, cropping of images is such a useful thing that it
>>could have it's special case in the gnuplot core.
> It cannot be implemented in the core, because it is a terminal-specific
> operation. E.g., how on earth would the core code know anything about
> a particular pixel in an output png image?
The core knows the overall dimension of the image, and I think that is all it would need to know.
> Even more impossible is to
> know about the "pixels" in an output PostScript file whose font
> characteristics will only be determined by the eventual print device.
Well, that is what I'm saying. Only if there is absolutely nothing except an image in the plot could one assume the cropped output resolution should match 1 to 1 the size of the image. Once there is anything else like a font, tic mark, axis, etc., this should no longer be assumed possible. PostScript does not have an output resolution like other formats such as PNG, JPEG and GIF.
>>Well, JPEG is out.
> Are you talking about mencoder here?
No. I'm not that far yet. I'm just looking at the images created by gnuplot right now.
See attached example JPEG converted to PNG. You should be able to see how the JPEG library creates images where individual pixels are spatially interpolated.
In the particular application of interest, it must be one matrix element creates one image pixel. No spatial interpolation because that will confuse the interpretation of the data.
You can see the issue here, unless the output is 20 x 20 exactly matching the image, there will be half pixels and so on so that not until 100 x 100 does the actual result start looking like a nice arrangement.
It's fine if we are looking at one or two images, but I'm interested in 20 images per second on the order of minutes. Hence, efficient images are of interest to me.
> JPEG supports a loss-less mode. But yes, normally if you want
> loss-less images you would pick a different format.
> Animation normally involves interpolation between frames, and saves
> space by sending full "index" frames every Nth frame but intervening
> update frames with only incremental or interpolated contents.
> The ratio of full to partial/interpolated frames can be set at the
> time you encode the animation.
> Sounds like you want index frames only. That is definitely possible.
Probably, but that is for the movie making software to deal with, as I understand.
> A whole lot more people can easily view an embedded gif on a web
> page than will take the time to install some fancy movie-player
> just so they can afterwards download and look at your plot.
Sure, but I'm thinking there are as many people who would like to generate a movie (not for a web page), angiography images, space images, etc. Then play it back in some viewer.
>>Alright, let me look at generating movies with ImageMagick...
> Wrong tool.
> You really do want mencoder. Believe me.
OK. I'm interested. Will investigate.
> But you may have to build it from source to get a full range of
> supported formats.
Oh, it seems everything I need requires the source. The only thing up to date in Fedora, et al. is the compiler, whereas apps are months, if not years, old.