Saved images colors not accurate

3 次查看(过去 30 天)
Hi, in R2010a, why when I save my figures in different image formats (png, jpg, bmp, etc.), my blue curves become purples? This is very annoying. Thanks for your help!
  1 个评论
Roque Cespedes
Roque Cespedes 2012-9-13
编辑:Roque Cespedes 2012-9-13
It seems like something was wrong with my computer yesterday. Today my colors save and look correctly/accurately. Thanks Walter Roberson and Image Analyist for your answers!

请先登录,再进行评论。

采纳的回答

Roque Cespedes
Roque Cespedes 2012-9-13
编辑:Roque Cespedes 2012-9-13
It seems like something was wrong with my computer yesterday. Today my colors save and look correctly/accurately. Thanks Walter Roberson and Image Analyist for your answers!

更多回答(2 个)

Walter Roberson
Walter Roberson 2012-9-13
How is the saving being done? Is it the figure or the plot that is saved or is it an image? In particular, if you are saving a pseudocolor image using imwrite() then you need to pass in the colormap to imwrite()
  1 个评论
Roque Cespedes
Roque Cespedes 2012-9-13
编辑:Roque Cespedes 2012-9-13
I have used both saveas(gcf, fig1.png) and the Matlab user interface's File >> Save as. Blue curves produced by plot(X,Y,,'--b') save as purple. I have tried saving as png, jpg, bmp, and pdf with the same result/issue...

请先登录,再进行评论。


Image Analyst
Image Analyst 2012-9-13
The only way I can see that happening is with jpg files where the image is compressed and you get funny colors and jpeg artifacts. BMP and PNG are lossless so you won't notice any color changes. If you think you do, write a small script to prove it to me.
  1 个评论
Roque Cespedes
Roque Cespedes 2012-9-13
编辑:Roque Cespedes 2012-9-13
I have used both saveas(gcf, fig1.png) and the Matlab user interface's File >> Save as. Blue curves produced by plot(X,Y,,'--b') save as purple. I have tried saving as png, jpg, bmp, and pdf with the same result/issue...

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Purple 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by