Image Editors for Programmers? - windows

This is not technically a programming question, but I believe its still relevant to software developers.
My question is: What image editors are there that are targeted at programmers. Specifically editors with the features that the older generation of image editors had. Modern image editors (such as The Gimp) seem to abstract away the vagaries of each image format.
A programmers editor would let one:
Set the index of the transparent color when working with formats like GIF.
View and edit the color table for palletized formats.
(obviously) load and save a wide variety of formats (gif, png, tiff, pcx, bmp, jpeg, ico etc.) without loosing any metadata relevant to the format.
view and edit of said metadata.
work with multiframe (animated gif) or multi image (ico) formats.
edit the alpha channel for image formats with alpha.
Do such beasts no longer exist?

I use Gimp for such purposes...
The only trouble with it - it is uncomfortable with ico files.

If you are comfortable with a command-line interface, I think you can do all the above with ImageMagick or GraphicsMagick.

Paint.Net for Windows or Pinta for most platforms, not as complicated as Gimp or Photoshiop but with enough features.

Related

export cpntools project to jpg/png

i searched all around the web and could not find a way to export a CPN (Colored Petri Nets) model in cpntools to a jpg or png image.
here is a fuzzy article but not so informative and helpful.
is there any idea?
You can use the "Print net" tool to export your Petri net as an EPS file, then use an image conversion program to convert that to jpg or png.
More information can be found here:
http://cpntools.org/documentation/gui/palettes/net_tools/print_net
Note that I have had issues loading the exported EPS format in some editors (e.g. GIMP), but online conversion tools usually manage to convert them to other formats fine.

How to remove anti-aliasing in PDF images?

I use Abbyy FineReader for ScanSnap to OCR a couple of scanned PDF files. The software claims it retains the original PDF images. The PDF file sizes pre-OCR and post-OCR are almost identical, which is good.
After the software is done, all PDF images appear anti-aliased in Acrobat X. Page navigation is much slower than before, and when I zoom in/out, the images first go to what looks like the pre-anti-aliasing version before quickly changing to anti-aliased images.
Left: Scanned PDF / Right: after OCR with Abbyy
I would like to get the original images without anti-aliasing back. Interestingly, when I open a single page from the anti-aliased PDF in Photoshop, there is no anti-aliasing and the image looks like the left one.
My limited PDF programming experience leads me to believe that Abbyy likely sets some kind of anti-alias flag for each image during OCR processing. How do I un-set this flag?
Any pointers to useful ideas would be much appreciated.
After the software is done, all PDF images appear anti-aliased in Acrobat X. Page navigation is much slower than before, and when I zoom in/out, the images first go to what looks like the pre-anti-aliasing version before quickly changing to anti-aliased images.
Actually in the original file 2013_11_15_22_51_31.pdf contains a JPEG image while the OCR'ed file 2013_11_15_22_51_31_OCR.pdf contains a JPEG2000 image.
Comparing them in third party viewers, it becomes clear that the image in the OCR'ed file is not inherently anti-alias'ed. Furthermore there is no evident flag in the PDF instructing PDF viewers to apply anti-aliasing to the JPEG2000 image. Thus, Adobe Reader seems to automatically render JPEG and JPEG2000 images differently, applying anti-aliasing to the latter but not to the former.
Comparing both images in detail, though, it becomes clear that these images are not identical but instead the image in the OCR'ed PDF is slightly rotated.
I assume Abbyy FineReader recognized that the original scanned image is not correctly oriented. Thus, it rotated it slightly to correct this orientation.
Thus, replacing the image in the OCR'ed version with the one from the original one is no option: Due to the rotation the OCR information would partially be somewhat off.
What you might want to try is to recode the JPEG2000 image to JPEG and replace the image in the OCR'ed version with this recoded one. This will mean some loss of quality but most likely you can get rid of the anti-aliasing this way.
Be aware, though, that the JPEG2000 image is slightly larger than the JPEG image to accomodate for the rotation.
PS: As #VadimR pointed out, there is indeed an /Interpolate true entry in the image dictionary of the OCR-ed version I missed when looking at the file. This does not seem to be the major issue slowing down the rendering.
There is /Interpolate true entry in image dictionary of OCR-ed version, and that's what causes 'anti-aliasing'. Whether that (and not JPEG2000 instead of JPEG compression) is a cause of slow-down, you check on large enough files.
To un-set this key, the best would be to turn it off while creating a file, and if that's not possible, to write and run a small program in suitable language.
But, since your file doesn't sport 'compressed objects' and offending key is in plain view inside a file, in the spirit of 'job done quickly' you can simply process your file e.g. like this:
perl -M-encoding -0777pe "s!/Interpolate true!' 'x17!ge" <in.pdf >out.pdf

What image formats do the major browsers support? (2012)

I was wondering what image formats (aside from the basic JPEG, GIF, PNG) the major browsers would support, especially Chrome, Firefox, and Webkit. If anyone can provide a link to a list somewhere (that is updated frequently to cope with the frequent updates recently) that would be great. Support for other formats (like document and video) would also be nice.
I feel like this information should be listed somewhere, but I didn't find any such thing when I searched.
Here is a nice resource: http://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support
Major image file support
.bmp, .jpg, .jpeg, .png, .gif
New
.webp
The image format supported in popular browsers: BMP, SVG, JPG, PNG and GIF. There is no two format jpeg or jpg, it's one with multiple extensions used due to see here.
Note: SVG(Simple Vector Graphics) can produced much smaller images but allows only vector images(no raster).
Next, the other formats used are webp and jpeg2000.
Webp:- Supported by many browsers such as Chrome, Opera. There is an issue running for Firefox support here. Note that, Webp can reduce the image memory size to around 30-40% of the original size(in our experiments) on an average. This doesn't means always as sometimes we have seen transcoded webp from jpegs to go beyond the original jpeg size. The output image had no visual difference compared to original jpegs. My suggestion: serve webp where possible, i.e. Chrome, Android, Opera.
JPEG2000:- This format is great. Resizing an image does not drop quality as much as JPEG. The problem is it's too computation intensive for decoding and the fact it came over a decade ago when hardware wasn't great(especially not meant for mobile). It still is used in some cameras as it results in smaller images.
Less popular but worth mentioning: BPG and FLIF. This will require using JS or other library to serve on web/app.
JPEG and PNG are supported by the every browser. But the new image format which is webP is only supported by the Chrome, and partially by the Firefox and not at all supported by the Safari at all. Thou WebP is really good as it does not compromise with the quality of the image and also reduce it to 25-35% less. But we cant still use it because it is less flexible in the different browser environment.
But you can look for the other image format also which are available and compatible for each browser type.

Image processing batch tool to resample images with YCbCr=4:4:4

I am looking for lightweight image processing tool that will resize images to JPEG in YCbCr = 4:4:4, that is, no chromatic subsampling. I am using this to generate square thumbnails.
I need 4:4:4 because I am not sure about the quality of 4.2.2 or 4.1.1 as they will have greater amount of artifacts, which will affect the quality of my thumbnails.
It will be run from a web server (ASP.Net MVC 3). Command-line tool, standalone application and libraries are all acceptable since it will run in separate processes anyway.
Anything out there except ImageMagick? I think it is too bulky.
Thanks a lot for answering.
Windows Imaging Component allows you to choose your own JPEG chroma subsampling option. See Encoder Options: JPEG Codec specific options: JpegYCrCbSubsampling
This is a very heavy-handed approach and requires a somewhat difficult learning curve. You may want to look for other options before delving into WIC.
IrfanView has an option to remove color subsampling. In JPEG save dialog, check "Disable color subsampling". This should store the JPEG with all channels in full resolution.
However, looking at its command-line option manual, I don't find any mention of this option. So, it may not be possible to automate or programmatically use this function.

Generate terminal graphics

which open source software options exist for generating terminal graphics? I mean, there is for instance the nice matplotlib, which can generate beautiful plots from data, in PNG or similar formats. But there are similar alternatives for generating just kind of ascii graphics?
Thanks
AAlib and libcaca can both be used to render images in character cells.

Resources