|
"Luigi Giaccari" <giaccariluigi@msn.com> wrote in message
news:hb4bcm$ojo$1@fred.mathworks.com...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message
> <ea20e2f4-7a56-4982-aca3-d58fd3e9a781@z24g2000yqb.googlegroups.com>...
>> On Oct 14, 6:20?am, "Luigi Giaccari" <giaccarilu...@msn.com> wrote:
>> > Hi,
>> >
>> > I barely know what a pixel is so I need help for the followong problem:
>> >
>> > I have a figure h=figure(1) and I am trying to save it as an image (bmp
>> > or png) I use:
>> >
>> > ?saveas(h,'path','name.bmp')
>> >
>> > It seems everything right to me but when I look at the saved image I
>> > notice that there are white areas where in the original figure they
>> > where black.
>> >
>> > These white areas appears like a flash during the execution of the
>> > saveas command ?????
>> >
>> > Does anybody knows anything about this problem?
>> >
>> > Thank you
>>
>> ------------------------------------------------------------
>> I don't use the poor MATLAB methods - it seems there are always
>> problems. Try using Oliver Woodford's excellent export_fig. It's
>> much better. It's in the File Exchange.
>
> Thank you,
>
> It seems that the problem is caused because the matlab routine consider
> the figure background color always white even if it is set to black.
>
> I solved it adding an uicontrol text colored in black. A little rough but
> it works.
If I understand the problem you describe correctly, a better solution is to
use the SET function to change the figure's InvertHardcopy property to
'off':
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure_props.html#InvertHardcopy
That section of the documentation explains why, by default, we "switch" the
background color of the figure when you export it and changing that property
will disable this behavior.
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|