Rank: Newbie
Groups: Guest
Joined: 6/23/2020(UTC) Posts: 5
Thanks: 1 times
|
I get error - Aurigma.GraphicsMill.UnsupportedPixelFormatException: 'The specified pixel format is not supported.' when I run this code. Code:var quality = 100;
var dpi = 92f;
using (var read = new PdfReader(fn, dpi, dpi))
using (var write = new JpegWriter(fnOut,quality,false,true))
{
Pipeline.Run(read + write);
}
It's as close to the sample code as it gets. fn is a valid path to a valid pdf file. Running v10.5.30 registered Edited by moderator Tuesday, July 14, 2020 9:13:37 AM(UTC)
| Reason: Not specified
|
|
|
|
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)
|
Please try to remove the alpha channel as the JPEG format doesn't support transparency. Code:var quality = 100;
var dpi = 92f;
using (var read = new PdfReader(fn, dpi, dpi))
using (var converter = new ColorConverter(PixelFormat.Format24bppRgb))
using (var write = new JpegWriter(fnOut,quality,false,true))
{
Pipeline.Run(read + converter + write);
}
|
Best regards, Fedor Skvortsov
|
1 user thanked Fedor for this useful post.
|
|
|
Rank: Newbie
Groups: Guest
Joined: 6/23/2020(UTC) Posts: 5
Thanks: 1 times
|
Hmmm - that worked. Thank you! Would have saved me much time to include a note about that in the documentation.
|
|
|
|
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.