Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
camelord  
#1 Posted : Monday, June 12, 2006 7:54:20 PM(UTC)
camelord

Rank: Member

Groups: Member
Joined: 5/31/2006(UTC)
Posts: 20

Hi, i tried to save a Aurigma RGB Image with transparency as a cmyk image. Unfortunatly, the transparency displays as white. What do i wrong? The barcode.HasAlpha Flag says true! Here is the Code: [code=c#]//this function is called from main() private void test1() { Aurigma.GraphicsMill.Bitmap barcode = getBarcodeImg(); //Assing output CMYK profile for conversion barcode.ColorManagement.CmykColorProfile = new Aurigma.GraphicsMill.ColorProfile( @"C:\Projekte\zeiser\download\Adobe ICC Profiles\CMYK Profiles\EuropeISOCoatedFOGRA27.icc" ); barcode.ColorManagement.ConvertToContinuous( Aurigma.GraphicsMill.ColorSpace.Cmyk, barcode.HasAlpha, false ); barcode.Save( "test.tif" ); } private Aurigma.GraphicsMill.Bitmap getBarcodeImg() { Aurigma.GraphicsMill.Bitmap barcode = new Aurigma.GraphicsMill.Bitmap( 200,200, Aurigma.GraphicsMill.PixelFormat.Format32bppArgb); Graphics g = barcode.GetGdiplusGraphics(); Rbarcode1D bc = new Rbarcode1D(); bc.Code = "12345678"; bc.BarType = Rbarcode1D.tbarType.CODE128; bc.BarFontColor = Color.FromArgb( 221, 200, 171 ); bc.ForeColor = Color.FromArgb( Aurigma.GraphicsMill.Color.FromCmyk(100,100,255,255) ); bc.BarBackColor = Color.FromArgb( 255, 255, 255, 255 ); bc.paintBarcode( g ); return barcode; }[/code]

Edited by user Wednesday, December 19, 2007 4:19:30 PM(UTC)  | Reason: Not specified

Mattias Malm  
#2 Posted : Tuesday, June 13, 2006 12:02:28 AM(UTC)
Mattias Malm

Rank: Member

Groups: Member
Joined: 5/4/2006(UTC)
Posts: 17

I'm having the same problem, although it doesn't seem to be CMYK that causes the problem. I loose the alpha channel whenever I save as TIFF, regardless of color mode (RGB, CMYK or GrayScale). Try saving it as RGB TIFF to see if the transparency is lost in that situation aswell. The only way I've been able to keep the alpha channel is by saving in PNG format (only RGB and GrayScale supported for PNG).
Dmitry  
#3 Posted : Tuesday, June 13, 2006 8:10:49 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello, I have tried the following code:
Code:

private void Test()
{
	Aurigma.GraphicsMill.Bitmap barcode = GetBarcodeImg();
	barcode.ColorManagement.CmykColorProfile = new Aurigma.GraphicsMill.ColorProfile(@"c:/cmykconvert.icm");
	barcode.ColorManagement.ConvertToContinuous(Aurigma.GraphicsMill.ColorSpace.Cmyk, barcode.HasAlpha, false);
	barcode.Save(@"d:/temp/TransparentCMYK.tif");

	barcode.Load(@"d:/temp/TransparentCMYK.tif");
	if(!barcode.HasAlpha)
		MessageBox.Show("Bitmap has no alpha channel.");
}

private Aurigma.GraphicsMill.Bitmap GetBarcodeImg()
{
	return new Aurigma.GraphicsMill.Bitmap(200, 200, Aurigma.GraphicsMill.PixelFormat.Format32bppArgb);
}
Everything works correctly, Adobe Photoshop shows 5 channels inculding alpha. Which editor do you use to view channels?
Sincerely yours, Dmitry Sevostyanov UserPostedImage Follow Aurigma on Twitter!
Mattias Malm  
#4 Posted : Tuesday, June 13, 2006 8:56:14 PM(UTC)
Mattias Malm

Rank: Member

Groups: Member
Joined: 5/4/2006(UTC)
Posts: 17

Dmitry, you're absolutely right about the channels. The saved TIFF image DOES have a channel with alpha data. I also found it when looking under the Channels tab i Photoshop. However, I cannot get Photoshop, InDesign or MS Office Document Imaging to recognize it as an alpha channel. It's just another channel. When I save the same image in PNG format (only RGB or GrayScale supported) the alpha channel is recognized by these applications. How can I get Photoshop to recognize the alpha channel? Edit: Spelling...
Dmitry  
#5 Posted : Wednesday, June 14, 2006 7:45:15 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello, It is very strange... I create CMYK image with alpha channel by Graphics Mill for .NET, save it to TIFF, then load it by Photoshop, convert in to RGB in Photoshop and save it to TIFF. So we have RGB TIFF file with alpha channel. This file is loaded correctly by different imaging software - e.g. by Windows Picture and Fax Viewer. Which operations do you want to perform using CMYK images with alpha in Photoshop?
Sincerely yours, Dmitry Sevostyanov UserPostedImage Follow Aurigma on Twitter!
Mattias Malm  
#6 Posted : Wednesday, June 14, 2006 9:53:43 PM(UTC)
Mattias Malm

Rank: Member

Groups: Member
Joined: 5/4/2006(UTC)
Posts: 17

Maybe I don't fully understand the concepts of transparency and alpha channels, but what I would like to do is this: 1. Open an image with transparency (for example "Ducky.tif") with Graphics Mill for .NET. 2. Resize, convert to different color space or do nothing. 3. Save image as TIFF or PNG with transparency. Everything works as expected except saving the image as TIFF with transparency. As you can see in the attached image, transparency is lost when saving as TIFF. Instead there is a new channel called "Alpha 1", but neither Photoshop nor InDesign recognize it as transparency. Saving as PNG works fine. Here is my simple code to open "Ducky.tif" and save "OpenAndSave.tif" and "OpenAndSave.png":
Code:

Bitmap gmImage = new Bitmap(Server.MapPath("Ducky.tif");
gmImage.Save(Server.MapPath("OpenAndSave.tif"), new TiffEncoderOptions(Aurigma.GraphicsMill.Codecs.CompressionType.None));
gmImage.Save(Server.MapPath("OpenAndSave.png"), new PngEncoderOptions(false));
Dmitry, when you open a TIFF image with alpha channel created by Graphics Mill for .NET in Photoshop, do you get transparency? / Mattias Malm The first image is the original created in Photoshop and opened with Graphics Mill for .NET. The second image is the TIFF saved from Graphics Mill for .NET. The third image is the PNG saved from Graphics Mill for .NET. UserPostedImage

Edited by user Monday, December 21, 2009 3:01:11 AM(UTC)  | Reason: Not specified

Mattias Malm attached the following image(s):
Transparency.jpg
Dmitry  
#7 Posted : Thursday, June 15, 2006 7:43:28 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello, It seems our alpha channel is recognized as mask layer by Photoshop. We try to solve this problem. At this moment we can advise you to use the following workaround in Photoshop - load TIFF file created by Graphics Mill for .NET with transparency. Go to channels palette and select RGB or CMYK channels (the first channel), then click with CTRL on alpha channel. After that choose Magic Wang tool and left click on image. Select "Layer Via Cut" in context menu. After that you see new channel with correct transparency in backgound.
Sincerely yours, Dmitry Sevostyanov UserPostedImage Follow Aurigma on Twitter!
xiaoyuandlg  
#8 Posted : Thursday, July 03, 2014 1:46:34 AM(UTC)
xiaoyuandlg

Rank: Newbie

Groups: Member
Joined: 7/3/2014(UTC)
Posts: 1

Not quite familiar with the CMYK channels. However, as respect to the barcode part, I noticed that be quite interesting to study some free code to recognize barcode in .net. I had recently visited some barcode tool websites, and I imagine that would some barcode knowledge be helpful to this question?
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.