This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
bma  
#1 Posted : Tuesday, January 26, 2016 9:08:42 AM(UTC)
bma

Rank: Member

Groups: Guest
Joined: 1/12/2016(UTC)
Posts: 23

Thanks: 8 times
Hello,

I have an image with Tga format and when I use ImageReader, I get the following exception: "The media format is not supported."... However if I use TgaReader, it works fine.

I would like to use ImageReader.Create() to see which extension the image has..

Stack Trace:

at Aurigma.GraphicsMill.Codecs.CodecsRegistry.CreateReader(FileFormat format, Object source)

at Aurigma.GraphicsMill.Codecs.ImageReader.Create(Stream stream)

at ImageProcessor.ManualTests.Program.ReadTga() in d:\code\projects\ImageProcessor\ImageProcessor.ManualTests\Program.cs:line 57

at ImageProcessor.ManualTests.Program.Main(String[] args) in d:\code\projects\ImageProcessor\ImageProcessor.ManualTests\Program.cs:line 50

at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)

at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)

at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()

Code used to create tga image:

Code:
private static void WriteTga()
{
	using (var bitmap = new Bitmap(@"D:\img.jpg"))
	{
		bitmap.Transforms.Flip(FlipType.Vertical);
		bitmap.Save(@"D:\out.tga");
	}
}

Code used to read the image:

Code:
private static void ReadTga()
{
	var media = File.ReadAllBytes(@"D:\out.tga");

	using (var reader = ImageReader.Create(new MemoryStream(media)))
	using (var writer = new TgaWriter(@"D:\out.tga2"))
	{
		writer.Compression = CompressionType.Rle;
		writer.ReducedPrecision = true;

		Pipeline.Run(reader + writer);
	}
}

Edited by user Wednesday, January 27, 2016 9:28:53 AM(UTC)  | Reason: Not specified

Fedor  
#2 Posted : Wednesday, January 27, 2016 4:08:57 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
We confirm the problem (Aurigma Bug #0021710). Our engineers will fix the problem shortly.

I will keep you informed of the status.

Best regards,

Fedor Skvortsov

thanks 1 user thanked Fedor for this useful post.
bma on 1/27/2016(UTC)
Fedor  
#3 Posted : Tuesday, February 16, 2016 2:33:17 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
We have just released the new version 8.1.12 of the Graphics Mill SDK where we have fixed the problem.
Best regards,

Fedor Skvortsov

thanks 1 user thanked Fedor for this useful post.
bma on 2/16/2016(UTC)
Users browsing this topic
Guest (5)
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.