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
ChristianGad  
#1 Posted : Tuesday, January 5, 2016 7:08:34 AM(UTC)
ChristianGad

Rank: Member

Groups: Guest
Joined: 7/3/2005(UTC)
Posts: 6

Thanks: 1 times
Hi

I have some jpg images which makes the error "Invalid JPEG mark" when they are opened with Photoshop.

The image loads without errors i graphicsmill.bitmap. Is it possible to detect "invalid JPEG marker" in a image. Then I can save a new jpg file, and this has no errors in Photoshop

I don't want to open and save all images due to jpg compression. If it is the only solution then I have to do so.

Thanks

ChristianGad attached the following image(s):
img1450924440044_206448e07ef2bb8c703dd79_1.jpg
Fedor  
#2 Posted : Tuesday, January 5, 2016 9:06:23 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)
Hi,

The following code should help you to detect damaged files:

Code:
try
{
	using (new Aurigma.GraphicsMill.Codecs.LosslessJpeg(@"corrupted.jpg"));
}
catch (Aurigma.GraphicsMill.Codecs.MediaCorruptedException ex)
{
	Console.Write(ex.Message);
}
Best regards,

Fedor Skvortsov

ChristianGad  
#3 Posted : Wednesday, January 6, 2016 3:05:29 AM(UTC)
ChristianGad

Rank: Member

Groups: Guest
Joined: 7/3/2005(UTC)
Posts: 6

Thanks: 1 times
Thanks, It works perfect

Users browsing this topic
Guest (2)
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.