When saving a CMYK file as JPEG, the file looks great in Windows, but on Mac OS X it looks inverted. A CMYK file saved as JPEG from Photoshop looks great on both platforms, so there is obviously a difference in how GraphicsMill and Photoshop saves CMYK JPEG files. Do you have any suggestions on how to make CMYK JPEG files saved from GraphicsMill work on both Windows and Mac OS X?
You can use Apple Safari on Windows to see the how the CMYK JPEG files look in Mac OS X (see attachment).
Here is a simple example:
CmykJpg.aspx
Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CmykJpg.aspx.cs" Inherits="Tester_CmykJpg" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:FileUpload ID="Image" runat="server" />
<asp:Button runat="server" OnClick="ConvertToCmyk" Text="Konvertera till CMYK" /><br />
<img src="/Temp/UploadedImage.jpg" />
<img src="/Temp/ConvertedCmykImage.jpg" />
<asp:Literal ID="Debug" runat="server" />
</form>
</body>
</html>
CmykJpg.aspx.cs
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Aurigma.GraphicsMill;
public partial class Tester_CmykJpg : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Debug.Text = "";
}
protected void ConvertToCmyk(object sender, EventArgs e)
{
// Save uploaded image
if (Image.PostedFile.ContentLength > 0 && System.IO.Path.GetExtension(Image.PostedFile.FileName).ToLower() == ".jpg")
{
Image.PostedFile.SaveAs(Server.MapPath("/Temp/UploadedImage.jpg"));
}
// Convert image to CMYK
if (System.IO.File.Exists(Server.MapPath("/Temp/UploadedImage.jpg")))
{
Bitmap gmImage = new Bitmap(Server.MapPath("/Temp/UploadedImage.jpg"));
gmImage.ColorManagement.ConvertToContinuous(ColorSpace.Cmyk, false, false);
gmImage.Save(Server.MapPath("/Temp/ConvertedCmykImage.jpg"));
Response.Redirect("CmykJpg.aspx?" + DateTime.Now.Ticks.ToString());
}
else
{
Debug.Text = "No uploaded image.";
}
}
}
Best Regards
Mattias Malm
Mattias Malm attached the following image(s):