How to generate progressive JPG with ImageResizer.net - imageresizer

I am using the following code to generate a progressive JPG:
ImageResizer.ImageBuilder.Current.Build(srcFileName, dstFileName, new ResizeSettings("progressive=true"));
I am verifying if the JPG is progressive using ImageMagik identify command:
identify -verbose dstfile.jpg
And I get:
Interlace: None
I am generating progressive JPG files using Photoshop and identify does report:
Interlace: JPEG
Looking at documentation, this feature was added on version 3.1 Dec 7 2011. I am using version 3.3.2.447.
I am not sure if I am missing a plug-in or additional commands.

Progressive jpeg encoding is only available with the FreeImageEncoder plugin installed - you must also use the &encoder=freeimage command. Neither WIC nor GDI+ offer progressive jpeg encoding, but both WIC and FreeImage support subsampling control.
Also note that progressive jpegs require more mobile device RAM to decompress, and only offer a speed benefit at larger output sizes (I.e, > 600x600)

Related

ImageResizer - Outputting resized images with embedded ICC profiles

I've been playing around with ImageResizer for a week or so now and am wondering if it's possible to output resized images with the same ICC profile embedded (and in the same colour space) as the source image, for example the Adobe 1998 colour space?
I intend to use ImageResizer as part of my company's workflow for thumbnailling our source images before our imaging dept looks at them for consistency, so the same colour profile is essential. Generation speed isn't too important as they will be cached once generated.
Can someone please tell me if ImageResizer is capable of this and which parts of the pipeline I would need to overload to achieve this?
Thanks.
ImageResizer targets the web, always produces images in the sRGB color space; browsers don't support ICC profiles, so we don't use them.
That said, you can certainly modify a few lines and get the result you want.
ImageResizer has 3 pipelines - GDI+ (the default), FreeImage, and WIC.
GDI+ does not support output profiles - at least not through System.Drawing.
FreeImage is supposed to have very good ICC profile support
WIC should have ICC profile support as well, but is likely to share bugs with GDI+ as both use the same codecs.
To make changes, go to the ImageResizer repository and click the 'fork' button.
When you clone your fork, be sure that you switch to the develop branch before making changes - otherwise your changes will not be compatible with the next major version.
You'll probably want to modify Plugins/FreeImage/FreeImageEncoder.cs. FreeImage documentation is in pdf form (yay!), so you'll probably want to scan that quickly to understand how it handles profiles.
When testing, make sure you enable the 3 FreeImage plugins by installing them and activating them via their command strings, &builder=freeimage will activate the full FreeImage pipeline, but &encoder=freeimage will just activate the encoder portion (useful if you want to edit the image with GDI+, but save via FreeImage).
You will likely also want to use the ignoreIcc=true command, so that you don't see sRGB values interpreted as Adobe RGB.

Template rendering engine on Raspberry Pi

I have a project in which I am using a Raspberry Pi to print ticket to a thermal printer.
It is pretty much the same principle as in this video.
Tickets are generated from templates that may include text and images. Both text and images are dynamic, for example I may want to print the current time. I receive the template as a .psd from a designer and the thermal printer takes bitmap data. The Raspberry Pi communicates to the printer with a python library. Everything must be done locally as cloud access is not guaranteed. Performance is important.
I investigated several options:
Latex + ImageMagick
Webkit + Phantom.js
Pillow (Python Imaging Library), especially the module ImageDraw
The first option is not quite satisfying because Latex generates a pdf file and then ImageMagick is very slow to convert it to a .png.
The second option is seducing but if I am not mistaken, I would need to start a server locally.
The third option would be great because it will be pure python, but requires to build a basic typesetting system on top of PIL.
Has anyone been confronted to a similar problem ?

Converting PDF to TIFF

I am looking for some tool or library (.NET version will be perfect) I could use to convert some big PDF files (over 200MB) to TIFF in the product we are developing for our client.
I need tool I could call from the command line or a library that I could use in the .Net application.
I have tested ghostscript, and it works perfect but according to its license, we cannot use it.
Do you have any experience with free or commercial products we could use for it? Could you recommend something?
Thanks in advance!
As you explicitly ask for commercial software as well, callas pdfToolbox performs this task. I'm affiliated with this company / product so draw your own conclusions about quality / price. However, the software:
works perfectly on the command-line
exports to PNG, JPG or TIFF (or rasterized PDF)
exports to either grey, RGB or CMYK
supports smoothing and overprint preview (important when you're in graphic arts, likely less so if not)
is available on Mac OS X, Windows, Linux and Unix
Send me a private message if you want to know more.
Gnostice PDFOne .NET has a PDFDocument.SaveAsMultiPageTiff() method that you can use.
http://www.gnostice.com/nl_article.asp?id=215&t=Convert_A_Multi-Page_TIFF_To_PDF_Using_PDFOne_NET

SDK to Encode and Decode JPEG2000 images from C++ code

I am looking for an SDK for (roughly) the following capabilities regarding JPEG2000 files –
Decode and encode J2K files.
Decode to access individual elements (boxes, marker segments, image stream, etc.) of JPEG2000 images for inspection and potential alteration of texts and bits.
Encode (reconstruct) the JPEG2000 image with given elements.
This is all done from within C++ applications.
It must support 64-bit Redhat Linux OS.
It should be able to handle J2K (JPEG2000) files as large as 16GB i.e. 64-bit file address.
Please tell me of SDK's with the above capabilities that you know or have used in your projects. Also, hints on performance and licensing/pricing would be appreciated.
The best JPEG 2000 library is Kakadu: http://www.kakadusoftware.com/
No problems, Kakadu can handle raw codestreams (j2c) and file formatted codestreams (jp2)
Full codestream access and manipulation.
Not sure what you mean here, but if you mean to assemble components together or pieces of an image (i.e. like tiles.) yes, Kakadu is more than capable.
Yes, it's written in C++ so it will easily integrate with other C++ applications.
Yes, every major platform is supported.
Yes, 64bit addressing is supported.
Source: http://www.kakadusoftware.com/documents/Overview.txt
As for pricing and licensing model, it's a bit different for how you use it. Licenses start from $250USD for individual licenses, $500USD for evaluation licenses. See here for the most accurate details on licensing: http://www.kakadusoftware.com/index.php?option=com_content&task=blogcategory&id=6&Itemid=12
Kakadu is authored by David Taubman, one of the key contributors to the JPEG 2000 specification. If you need JPEG 2000 to do something more, he will be a great person to ask for help.
Another commercial library to do this is Accusoft Pictools.
We use it for Medical Imaging purposes.
It supports most known formats including jpeg2000 (.jp2).
https://www.accusoft.com/pictools.htm
Has complete libraries to be called from unmanaged code.
regards
Ari

H264 frame viewer

Do you know any application that will display me all the headers/parameters of a single H264 frame? I don't need to decode it, I just want to see how it is built up.
Three ways come to my mind (if you are looking for something free, otherwise google "h264 analysis" for paid options):
Download the h.264 parser from (from this thread # doom9 forums)
Download the h.264 reference software
libh264bitstream provides h.264 bitstream reading/writing
This should get you started. By the way, the h.264 bitstream is described in Annex. B. in the ITU specs.
I've created a Web version - https://mradionov.github.io/h264-bitstream-viewer/
Based on h264bitstream and inspired by H264Naked. Done by compiling h264bitstream into WebAssembly and building a simple UI on top of it. Output information for NAL units is taken from H264Naked at the moment. Also supports files of any size, just will take some time initially to load the file, but navigation throughout the stream should be seamless.
I had the same question. I tried h264 analysis, but it only supports windows. So I made a similar tool with Qt to support different platforms.Download H264Naked. This tool is essentially a wrapper around libh264bitstream