Skip to content

gray background on jpegs using dev.print()

3 messages · John Muller, Brian Ripley

#
When I try writing the current device to a jpeg file I keep getting a gray background
for the jpeg images using dev.print.

I have tried using the option bg="white" and bg="#FFFFFF"
but neither seem to have any effect.

If instead of writing to a screen device I open a jpeg device I can get any background color
I want.  This works, but I prefer to write to the screen and then 
output to file if I like the results rather than to a file and have to view the jpegs
to see results.

I am using R version 1.8.1 on Windows 2000.

Has anyone else had this problem?
If so please let me know, especially if you found a better workaround or a fix.

- john muller
#
On Thu, 1 Apr 2004, John Muller wrote:

            
That's because you are not using the correct tool.  dev.print is designed 
for printing, as it says.
Where?  Is what you are copying on a transparent background (the default)?
What problem, exactly ...?  Please do read the posting guide and supply 
enough details for us to reproduce this.

And why if you are using Windows *are* you using dev.print when you are 
not printing and there are menus and savePlot to copy a plot to a jpeg 
file?
#
gives a white background on the jpeg copy.  Without the first line it is a
transparent background, and the default matte for JPEGS is grey74, so the
viewer displays it as transparent over a grey matte.


BTW, John Muller has given an address that does not accept email without
jumping through loops replying to HTML mail.  Can we please add to the
Posting Guide the requirement that a usable return address is supplied?
On Thu, 1 Apr 2004, Prof Brian Ripley wrote: