Script Fu - Brightness - gimp

I was wondering if anyone knows how to use script-fu in order to have gimp read in an image, modify the brightness/contrast and then save the image.
Thanx

Look into ImageMagick and it's command-line tools.

Related

How to save images during debugging the code in opencv?

Im working on reducing noise from noisy image in OPENCV using different filters. i want to know that how i capture or save the result images during debugging code?
You can:
Save with imwrite all your debugging images, better in a specific folder.
Use Image Watch which will enable you to see all your Mat in a nice and powerful viewer during debugging. Just download and install it. You can access the Image Watch viewer in VS: View -> Other Windows -> Image Watch
I recommend the second approach, which personally I find very useful.
Have a look also at this answer.
If you can use CLion instead Visual Studio you can utilize the OpenCV Image Viewer plugin, which displays matrices while debugging with just one click. There is also an option to save the image on a disk.
https://plugins.jetbrains.com/plugin/14371-opencv-image-viewer
Disclaimer: I'm the author of this plugin

Convert JPG,GIF,EPS and PDF to PDF with Imagemagick in PHP

I need to convert jpg,gif and eps files to pdf and vice versa. Is ImageMagick will be the best tool for this ? I have configure imagemagic with ubuntu 11.04 and using CLI trying to convert images into pdf, but quality is too bad. So what whoud be best approch to convertion ?
Thanks in Advance :)
You want to support two types of files; raster (jpg/gif) and vectorial (eps). Conversion from one set to the other is never lossless.
When converting from vectorial to raster or vice-versa, one crucial parameter is -density, that sets the image size before it gets converted.
Imagemagick is probably the right tool for vectorial to raster, it's just a matter of getting the parameters right. To transform raster to vectorial, better tools would probably be autotrace or potrace, but be aware these tools cannot do a perfect conversion.

Finding Largest Rectangle opaque with Imagemagick

I need to extract the biggest (area) rectangle which contains no transparent pixels from a picture.
Here's an exemple (maybe this hand made solution is wrong though):
I find some link about principles (in python) or same topic related issue (here) but without any answer.
Is it possible to make it with Imagemagick? or any command-line tool on linux?
I didn't find a command-line based tool to do that, so I 'forked' the version proposed by zed (J.F. Sebastian here) on github : largest_rectangle script by zed.

Tool for batch processing EPS to JPG

Does anyone know of a adobe command line tool for creating jpegs from pdfs. This needs to cater for EPS 15 ( CS5 )?
I am converting EPS files to hi-res JPEGS with imagemagic but the results are mediocre even when the EPS is scanned at a very high-res. I think imagemagic works off the eps preview rather than rasterizing the vector.
GIMP is a bit better but not perfect.
Photoshop produces perfect jpegs but I dont know of a command line utility for this and have used the scripting tools but found them a pain on large batches.
I have distiller server but this ( to my knowledge ) does not produce jpegs.
You could try ghostscript:
gs -sDEVICE=ppmraw -sOutputFile=file%d.ppm -r600 -dNOPAUSE yourfile.ps -c quit
I would give GraphicsMagick http://www.graphicsmagick.org a try. It's a fork of Image Magick, more complete and updated.
It internally uses GhostScript as the PS interpreter, it does not use the embedded image but it completely renders the postscript.
For best results, make sure that you work at the right density. Instead of the PostScript standard of 72 DPI, try
gm convert -density 144 infile.eps outfile.jpg
with different -density values and see if the quality improves.
If you're out of luck to find a command line tool for this, you can create a macro to script GIMP or Photoshop to do the job.
You have not mentioned the operating system, but if you're using OS X you can write an AppleScript which will do the converting through commanding the GUI programs.
In Windows you can download a macro recorder program, but I have no experience with that in the new versions of Windows.
http://www.reaconverter.com/command-line-image-processing.html for 50USD
Inkscape is a mature free vector graphics program with commandline import/export options. I would be happy to test its ability to handle EPS15 but I don't have CS5 or any documents in that format. If you can post a link I'll try it out.
http://www.adobe.com/eeurope/products/indesignserver.html does the Job.

Using ImageMagick from Command line in .Net?

I am using ImageMagick from Commandline in .Net? Although a .Net wrapper (ImageMagick.Net in codeplex) is available but it is still in alpha and does not have implementation for all the command line options e.g Distort, Montage. Therefore I am using System.Diagnostics.Process class to invoke the ImageMagick command line.
What are the Pros/Con of this approach? I can see a performance issue if I have to perform multiple transformation on the same image and if I invoke the command twice then the commandline will load the Image twice. Is there a way I can chain the commands so that output of the first transformation is feed into the second command?
It will definitely be slower, and when you chain commands, you are going to be encoding and decoding the image into a format unnecessarily -- if you do this, make sure you use a lossless format like PNG for intermediate formats. To speed it up, use one without compression.
Two other choices
Use ImageMagick.NET and then wrap anything else you need from imagemagick yourself, probably by contributing to the project
My company, Atalasoft, has a free .NET imaging SDK with a lot of overlap with ImageMagick. You can download here: http://atalasoft.com/photofree -- Montage is basically the same as our Overlay commands and Distort is a 2D transformation, which are all included. If ImageMagick.NET can accept and produce .NET Bitmap objects, then you can use both together fairly easily.

Resources