If anyone is interested in how to make this yourself, you don't need a fancy program. This method is faster then OPs, because it can be faster than real time (but it uses disk space).
(This is the command line guide, so it may require advanced knowledge)
You just need to install ffmpeg, and imagemagick.
Edit: See barracuda415's improved version below!
My version:
First, get the average color out of each frame in a video and save each one as a .png file.
ffmpeg -i <your movie file> -vf scale=1:1 -r 1 <output folder>/%06d.png
Using imagemagick, merge all the colors together
convert +append <output folder>/* out.png
Scale the output to the desired height
mogrify -scale x50! out.png
Bingo!
Your solution is not optimal, it uses 100% of my chromes thread on a 4.2GHz CPU and has like 2 FPS when scrolling. I think you have to come up with another solution because this is going to consume a lot of battery on mobile/tablet devices.
From WebKit Wiki: > Sometimes it's tempting to use webkit's drawing features, like -webkit-gradient, when it's not actually necessary - maintaining images and dealing with Photoshop and drawing tools can be a hassle. However, using CSS for those tasks moves that hassle from the designer's computer to the target's CPU. Gradients, shadows, and other decorations in CSS should be used only when necessary (e.g. when the shape is dynamic based on the content) - otherwise, static images are always faster. On very low-end platforms, it's even advised to use static images for some of the text if possible.
EDIT: To add more value to my response, could you perhaps instead dynamically add the blurred overlay to an image using something like ImageMagick or if your images are static, just add the blur directly onto the image?
The 2.9 nightlies have some better resamplers by Nicolas Robidoux (somewhat obscure, self designed, but decent nonetheless).
Otherwise I use imagemagick with gamma correction or imageworsener.
Gimp 2.8 and earlier does something hugely incorrect and overcomplicated, repeatedly shrinking by 1/2 until it's small enough to finish with an upsizing filter.
I assume you're on linux or OSX and know how to program a little bit. I also assume you want to do this lots of times, not just once.
1) Use imagemagick to crop out the slice of the image you need. It's a command-line tool so you can write a script to invoke it. http://www.imagemagick.org
2) Pass the slice into the OCR API here using the curl or wget command. http://www.datasciencetoolkit.org/
3) Parse the text using your favorite language (Perl, AWK, Java) to extract the timestamp
--PhD
I'm going to assume that this guy has never had to resize images before. An easy way to fix the "big files" problem is by using ImageMagick. It's as easy as opening a command prompt or terminal and running a quick command.
On Ubuntu for example you'd type
sudo apt-get install imagemagick mogrify -resize 4000x400 your_image_file_name.jpg (or .gif or.png...)
That's it. If the guy can't quickly do that then he's lazy. ImageMagick is available for Windows, OSX, and *nix.
In this case, you are thankful to the Free Software community, but not necessarily Linux. You're thankful for the huge number of free userland packages that give everyone the ability to do things that only very high dollar proprietary packages could do in the past.
Particularly, you're thankful for ImageMagick, which is available for all major platforms, including Windows.
Seconding this, anyone who needs to do similar operations on large number of images is doing themselves a disservice if they don't get familiar with all the stuff you can do in ImageMagick. Here's some examples to check out.
I messed up the one in the link! Click here for the fixed version that includes everyone!
Provided I haven't miscounted, we're now at ~~578~~ 593 custom flairs!
I guess I haven't really explained it, but I group custom flairs into "generations" based on which giant image file they're located in. Those flairs in Generation 0 are the very first ones and are part of the first file, but came before I established the 30x30 image size standard (which is why they are displayed vertically). I just finished filling up the fourth file today, so I thought it would appropriate to post a little update!
If you're wondering how I made this, I didn't do it by hand-- I wrote a script making use of the truly life-saving ImageMagick CLI, which I've also started using as a way to automate flair registration. If you deal with a lot of repetitive image work and know a little shell scripting, give it a look-- it is really indispensable.
Edit: Just realized some of the Gen 2 flairs on there are outdated >.> Here's one that has all up-to-date flairs on it.
Edit Edit: Wow, thank you everyone for your wonderful comments and the gold! You're all the best :)
ImageMagick's convert
can do that. You are somewhat likely to already have it installed.
For example:
convert image.jpg -resize 30% smaller_image.jpg
or
convert image.jpg -resize 640x480 smaller_image.jpg
If you want to overwrite the image, use the mogrify
command from the same package:
mogrify image.jpg -resize 30%
You can pass mogrify
as many files as you want. If you want to batch-process while preserving the originals, you may want to write a simple for
loop:
for image in *.jpg; do convert $image -resize 30% smaller_${image} done
EDIT: More examples.
While I disagree that this has NOTHING to do with developing, it still advertises as "CL tools for developers" and ends up being "networking CL tools for developers", which is a very small subset of what it advertised for.
Sure technically the smaller set is part of the bigger set, but I'm not a big fan of vague titles.
Personally, one useful command line tool that has helped me many times is ImageMagick. Insanely powerful tool for any sort of media conversion and editing and much more.
imagemagic, all the way. It is exactly what you are looking for. In the command line, you type
convert file1.png file2.png file3.png output.pdf
I'm sure somebody's written a GUI frontend to it anyway that will make it easy if you aren't familiar with the command line. It's open source and cross platform.
Gifsicle has Windows binaries available, as does imagemagick. Does his telling people how he did it somehow stop people from using online tools? All it does is inform people of a potential method of doing things. I use imagemagick
on Windows for things as simple as scaling images, or splitting a GIF into frames, not because there aren't online tools to do it, but because I know I can just compose a specific command with exactly what I want, run it, and get the output nearly instantly.
You could make a script that runs ImageMagick to create a 1px image with a color:
convert -size 10x6 xc:#121630 -fill black -scale 1x1 wall.png
You could then set that as the desktop background with this tool.
ImageMagick is a console tool that can do a large amount of different things to groups of images. I used it once to automatically crop a set of pictures so they had uniform borders.
Depending on how the identifying information is added, you may want cover a certain pixel area of your pictures, or you might want to crop away that text altogether.
> With a GIF you need to have 100% of the information for each frame.
GIF actually utilizes Frame Optimization to also only save changes between frames, so that's not really true - it's just really useless methode for video-like full motion clips, just like the format as a whole is.
First try. Untested so far.
#!/usr/bin/env bash
# nullglob - make globs expand to nothing instead of themselves, when there are no matching files # nocaseglob - makes globs case insensitive; *.mp3 will match foo.MP3 shopt -s nullglob nocaseglob
while IFS= read -rd '' dir; do mp3s=( "$dir"/*.mp3 ) n=${#mp3s[@]} if (( n == 0 )); then continue elif [[ ! -e $dir/Folder.jpg ]]; then printf '# No Folder.jpg\n%s\n' "$dir" else read -r width height < <(identify -format "%w %h" "$dir/Folder.jpg") if (( width != height )); then printf '# Wrong aspect (%dx%d)\n%s\n' "$width" "$height" "$dir" elif (( width < 500 )); then printf '# Low res (%dx%d)\n%s\n' "$width" "$height" "$dir" fi fi done < <(find . -type d -print0)
The identify
command used here is part of ImageMagick. It's usually not installed by default, but typically available in your OS's package manager.
> Where does one start to learn about optimization?
Specially for ImageMagick, I recommend this and this.
> Is the input video only or will it take a .gif and optimize that?
It converts videos to GIFs. It could also read GIFs directly, but that will mess up the timing due to the way how FFMpeg handles GIFs, so I use VirtualDub to convert GIFs to AVI instead.
> How would one even use the script you provided?
That's where the problems start. I just added the link so the comment isn't completely obscure and useless. Just to check the file size, I did this:
makegif.pl -q 5 GSqXDdK.avi GSqXDdK_2.gif
And the problem is that you'll need a Perl environment, FFmpeg, Gifsicle and ImageMagick to run the script. From my experiences, most here don't even know how to use cmd.exe, so I skipped writing a tutorial on how to download and install every single of these programs and that explains the basics of the command line interface.
If you're looking for something small and free, try image magick. It's a set of opensource command line image editing tools, stuff like converting to a different format, resizing, rotating, changing gamma or other levels and a lot of other features, all available in batch mode. Refer to the format list if you need to convert from some specific format first.
That said, I'd stay away from it if you're intending to convert raw images, though it handles most formats, and you can pass it several correction parameters like gamma, the images tend to look flat in my opinion compared to the output of other tools.
That's certainly motivation to push it upstream if you developed a fix in-house. However, sometimes new features (and a bit less often, fixes) are very high-value, to the point where handing them out for free seems like bad business sense.
Suppose I am a developer at Imgur. Like other image hosting sites with small image processing features (e.g. Photobucket), Imgur uses the open source Imagemagick toolkit for manipulating images. After a couple months of hard work, my team modified Imagemagick to let it work directly with PSD (Photoshop) files. This is a huge improvement, and would catapult open source image processing forward if pushed upstream, but... a couple months of three developers cost Imgur $50000-$60000. It's not a huge amount, but certainly nothing to sneeze at. Do we really want to deliver this on a silver platter to our competitors just out of the goodness of our hearts? And practically speaking, why should other non-competitor companies get to benefit from our investment at no cost (not just the immediate one into this feature, but also from the talent we hired)? This upgrade has tangible value. Why throw it to the wind?
The motivation to keep changes in-house goes beyond that when you consider trade secrets, patents, licensing/liability/warranty issues, and more fun stuff. The main motivations to push something upstream are somewhat easier maintenance (as you pointed out), good PR, and possible long-term benefits from people being super-familiar with your code (see: the Unreal Engine).
Open source is a nice concept, has had some very nice outcomes, and I believe should continue to be pushed to become more popular. However, the current state of software engineering strongly encourages not actively contributing.
ffmpeg is a great tool but to be honest i'd use imagemagick for this. Since you're talking about a batch file i presume windows as an os? In that case you'll need ghostscript also. Imagemagick uses this for conversion to and from pdf.
After installing a command like \path\to\imagemagick\convert my.pdf -density 300 my.jpg
should do the trick. If you have a multipage pdf several images will be generated seperatly for each page, like my-0.jpg, my-1.jpg etc.
e: added links and updated example, since i don't have windows i'm not really sure if it's 'convert' or 'magick convert'
It would be super helpful to know exactly what your script does/what libraries/APIs it uses (and why you can't just run it on node right out of the box). As someone who has used phantomjs a lot, I would strongly recommend against it unless there's absolutely no other way (at which point it's great).
You mentioned image scrambling - can you do the scrambling with imagemagic? If so, you can use one of the node imagemagic modules and likely have an extremely easy and performant solution. Without more details, that's the best I can offer.
Imagemagick is probably the most feature-complete graphics toolkit out there. It's also small, quick and very, very free. If you don't mind the command-line interface, converting your photos to a GIF shouldn't take more than 20 seconds.
The specific command would probably be "convert *.jpg -delay 5 -size 320x200 output.gif", but here's the complete animation manual.
As DaftPump said, use ImageMagick. Here is how to do what you want.
Once installed, just run convert dragon.gif -resize 50% half_dragon.gif
. Change the filenames first, of course.
You can even nest it inside a for file in *; do ...; done
loop if you want batch processing.
I haven't tried this but it shouldn't be that difficult to do. If I were to roll my own I would try to do:
1) Take a screenshot with chrome (" google-chrome --headless --disable-gpu --screenshot http://www.example.com/")
2) Use imagemagick to compare the screenshot from the previous captured image (http://www.imagemagick.org/Usage/compare/)
3) Use imagemagick to count the number of highlighted pixels to determine how big the change is. The link above seems to calculate statistics that you can parse and optionally apply a threshold to only notify you when the nr of changes is above a certain value.
4) Send a notification via any kind of messaging.
Then plop that into a script and register that as a cron job with crontab -e and you should be set.
The word here is resampling, not antialiasing. We try to reduce the number of pixels in the raster image while keeping all the small details intact. There are more than a dozen algorithms to do this, each producing a different output in terms of blurring, sharpening, moiré, speed, etc. No algorithm is perfect: one is good for photos, another works best with line drawings.
Edge probably uses some sharpening filter, such as Catmull-Rom or Lanczos3, which is not particularly good for logos: thin lines become aliased and grainy. Edge is also using GPU to render the page; it's faster but also has limitations on the complexity of image processing.
Possible confusion. I got mixed up reading this, hopefully this helps.
Your command line example isn't using the gimp add-on. It's a separate tool http://www.imagemagick.org/script/index.php
So these are two separate free ways to go about it. Super baller!
Edit: Another bonus! Using this method produces images that have more detail, it looks like it removes noise so the image looks super crisp.
For next time, grab ImageMagick and do in that folder:
mogrify -resize 2048x *.hdr
(replacing 2048 with your desired horizontal resolution)
That will replace the original files, so you might want to set the -path flag to put them into a different folder instead.
ITYM "As long as they don't overlap", which, unfortunately, the NASA images do, quite a lot. Properly stitching those together in ImageMagick is a wee bit more complicated than append
or <code>montage</code>. Re: www.imagemagick.org/Usage/scripts/overlap.
I bet you could get a pretty good result from imagemagick's composite function. http://www.imagemagick.org/script/composite.php
Assuming the camera does not move. You take a background frame for reference, and subtract it from each frame containing the ball. Alternatively, if you have a solid color background, you could set that color (range) to be "transparent" in the frames, then stack and merge them.
Either approach is going to be easier than manually masking the ball in every frame.
For those of you looking to use these massive files but unable to open them even in gimp, here's how. EDIT: As socialery points out imagemagick is available cross-platform, the following instructions are just for linux.
convert YOUR_FILENAME_HERE.tga OUTPUT_FILENAME.png
Enjoy! I was able to convert my ~1.9G image down to ~120MB
For bonus points throw in -resize 50% or any number of additional flags, run man convert
for more.
This is funny, at work I'm working on doing a mass image optimzation for our public facing web apps/web pages.
Right now im using Image Magick, and just doing a mass loss-less optimization - http://www.imagemagick.org/script/index.php
Just another option:
http://www.imagemagick.org/Usage/montage/
Just set up a file watcher on your image folder and have it run montage ./path/to/folder/* -geometry +0+0 mont.png
every time you modify a file in that folder
If they are all going to be cropped exactly the same I would use ImageMagick tools. If the images aren't centered the same and you are looking for a program that can find the edges, then ImageMagick might be able to do it, but it can be easily confused and pick the wrong coordinates.
They could also use imagemagick
After installing it with their package manager, it's as easy as running this command from the command line in the current directory:
convert *.png output.gif
This calls the convert
command, which is part of the imagemagick suite and is used to modify images and save the result in a separate file. (see man convert
or the online IM docs) The *.png
part selects all png files in the current directory as input (the png can be changed to jpg). The output file will be called output.gif
You can also add the flag -delay 10
to add a tiny delay between each frame of the gif. A larger number will give a larger delay. Finally you can add -layers optimize
to optimize the gif for a lower file size at the expense of less colors and lower quality, which is why you might just want to resize the final gif or the individual screenshots (convert -resize output.gif output_small.gif
) or upload the final gif to gfycat or even look into gifsicle
which is a separate utility which is much better at optimizing gifs.
ImageMagick's convert command may help. You could write a bash script that does the following:
I have never used ImageMagick, but let me know if it works for you.
You made this on Photoshop? Wow, I can imagine how tedious it was to resize each image manually. For things like this I recommend the ImageMagick suite, it has a tool exactly for this purpose:
montage -geometry +0 -resize 100x100^ -extent 100x100 image1.jpg image2.jpg ... output.jpg
The command above resizes each image to 100x100 (keeping aspect ratio) and stitches them together in a grid, writing the result as output.jpg
.
Here is an example using the covers from Alstroemeria Records and ALiCE EMOTiON from my music library.
Use Imagemagick on the command line. It should be very easy to whip up a script of some sort to do this automatically on all the photos in a directory. If you want some help I can help you.
Something like
FOR /R %cd% %%IMAGEFILE IN (*.JPG) do mogrify.exe -auto-level -despeckle %IMAGEFILE
(warning, that will modify the images in-place, so make sure you do it on a copy of the folder if you want to keep the originals)
This is oddly worded but Imagemagick can be used for this and is very quick. It has quality and resolution options. Just write a script like this suggests:
http://www.imagemagick.org/discourse-server/viewtopic.php?t=14587
You can just write a script using something like imagemagick's identify.
Something like (typing on phone, can't test):
find . -iname "*.jpg" -exec sh -c 'identify {} | grep 1920x1080 > /dev/null 2>&1 && echo {}' \;
should print the names of all files with size 1920x1080.
What I would probably do is first convert each jpg into pdf and then glue all the pdfs into one pdf.
To convert jpg -> pdf, download ImageMagick, and then from the command line run something like:
for f in /path/to/images/*.jpg; do convert "$f" $(basename -s .jpg "$f").pdf done
(This is what I would do on Linux, at least. basename
is a GNU core utility.)
Now that you have a bunch of pdfs, you can combine them with pdfjam
, which comes with TeX Live.
$ cd /path/to/images $ pdfjam -o myoutput.pdf -- *.pdf
I'm running Kingmaker in Roll20 as well. Do you have Kingmaker on PDF? If so, you can use some simple utilities to pull most of the images out of it for use on your whiteboards:
Make a folder on your desktop, call it "pdfextractor"; inside pdfextractor, make a folder called "exe".
Download xpdf for windows. You want the binaries in zip file form. Xpdf is what pulls images out of the pdf files; though it writes them out in ppm format.
From the zip file, copy bin\pdfimages.exe to the exe folder you made earlier.
Download ImageMagick for Windows. You will want ImageMagick-6.9.0-4-Q16-x86-windows.zip whose description reads "Portable Win32 static". ImageMagick will convert ppm files to png files (or whatever format you choose).
Copy convert.exe from the ImageMagick zip to your exe folder.
Open notepad, and copy/paste the following code. This will automate the extraction and conversion for you:
pushd "%~dp0" mkdir "%~n1" pushd "%~n1" ..\exe\pdfimages.exe %1 "%~n1" FOR /R %%a IN (*.ppm) DO ..\exe\convert.exe "%%~a" "%%~dpna.png" del *.ppm popd popd
Save the file as convert.bat in your pdfextractor directory.
Drag and drop pdf files onto the bat file and profit. The first program, pdfimages, extracts images as ppm files, which can't be used in roll20. convert.exe turns them into png, which can. Use an image editor to convert png to jpg or perform additional manipulation.
It depends on what you mean by similar - if you mean essentially as a grid of values then imagemagick can do that.
http://www.imagemagick.org/script/compare.php
If expect images with small shifts or scales or similar content to be similar this kind of approach will probably be disappointing. Other approaches include taking a perceptual hash of the image, sort of a small fingerprint that will be similar to similar images, a quick google shows an implementation on this site (I haven't tried it):
Otherwise there is image registration, trying to match up the rotation/scale/or other configuration of an image with another which could lead to a similarity measure. Medical image analysis is active area for this sort of thing.
And I guess there is also automatic image annotation where you attempt to label is in a label at a human language level, that could lead to a measure of similarity as well. For instances you might want to say a picture of a dog is similar to another picture of a dog, but they could be in very different poses with different colours that wouldn't be close on a purely image based system.
convert EKxktAy.gif YRTD3Xj.gif wraith-combo.gif
-> http://i.imgur.com/yt00Z6r.gif
Like that?
[As I mentioned recently, gluing them together like this is a lossless operation. The colors aren't affected.]
If you can handle a little Linux scripting, there is a "convert" utility (which invokes ImageMagick) to do exactly this.
edit: ImageMagick has Mac & Windows versions too, but I haven't used those.
Back in the old days of scanning film, the scanner would typically tack on a tiny amount of sharpening.
Most visual effects pipelines will include some component of sharpening to compensate for things like the flattening of plates (compensating for lens distortion), and stabilization, which add small amounts of blurring as a necessary byproduct of the operation (unless you're working in some wacko pipeline that turns 2k input images into 4k's for production work - but nobody does that.
Lest it's not obvious, many TV's actually have sharpening in their core function, which you have to drill down to and turn off. A TV sharpening every signal it receives is, needless to say, fucking stupid - - but someone at Sharp (or fill in the blank) wants their expensive engineers to have a visible effect on the display, I guess? So if you've got a new TV, you might want to look for and turn off that default sharpening.
As for "correct" sharpening, there's no such thing as empirically correct sharpening. You're distorting the contrast ratios of adjacent pixels in an arbitrary way, according to what looks good. There ARE good arguments for certain kinds of sharpening in certain cases - lanczos filter & energy preservation, for instance; or the algorithms used to pull accurate color and intensity when an image is being de-bayered.
a couple fun discussions: http://www.imagemagick.org/Usage/resize/ http://en.wikipedia.org/wiki/Bayer_filter
Each camera/sensor maker will have their own special sauce for pulling the best image out of their constellation of pixel sensors (RGGB in whatever configuration.) - - so in that sense, sure, just about any digital camera is likely to yield some component of sharpening, but the semantics of whether this is "post" or not are debatable.
Whoops - started to write a book. Signing off now ;)
If you're doing batch image processing, I strongly recommend using a command line API (or library) like ImageMagick. COM is for automating applications, for sure, but this is not a good use of either COM or Photoshop in this case. A free command line utility can do all of this (and way more quickly and efficiently, and you don't have to have an instance of photoshop running).
Probably the problem is with mvg format http://www.imagemagick.org/script/magick-vector-graphics.php
You can include files in it and after processing contents of this files will be visible in resulting image
Another problem is that image format not always correctly checked, so you can upload mvg file as png and remote server will process it.
convert.exe in imagemagick makes this so painless:
http://www.imagemagick.org/script/binary-releases.php#windows
convert.exe png1.png png2.png png3.png output.pdf
It supports wildcards, so you could use a batch for loop:
And your're done. Just output the pdf in the root as foldername.pdf
I just tried this (with x0109x and variations) and it did not work. Images enciphered with ImageMagick also don't look like the imgur link. See here for examples: http://www.imagemagick.org/Usage/transform/#encipher
You probably want to use ImageMagick. You can either use it on the command-line, possibly via a simple batch or shell script, or there are binding for various languages including Java via JMagick.
Here's how to use it to crop images.
In a bash shell (so a Linux or OS X command-line) you can do something like
for F in *.JPG; do convert $F -crop 60x60 $F.cropped; done
to convert multiple files in one go.
Isn't ImageMagick the standard for stuff like this? Basically, you write some ImageMagick optimisation functions that are triggered once an image has been uploaded to the server.
You can also try using PIL if you want to do it in Python.
Well there are various image manipulation libraries available but it depends on the programming language you want to use and specifically what you mean by "edit photos".
ImageMagick is a good tool for automated image processing tasks, and is also available as a library that you can control from other programming languages such as C++.
A popular choice for Python programmers is PIL, which is perhaps more accessible than ImageMagick while still being excellent at the most common tasks.
I looked around and I couldn't quickly find an online C++ compiler that would allow the program to make a file and the user to get it quickly.
I scrolled down far enough and one answer is in JavaScript, fyi.
Edit:
I ran it on my computer and found out I needed to install and use Image Magick to convert from ppm to png:
http://www.imagemagick.org/index.php
Thanks so much for your time, really appreciate it man! Hmm indeed the font is lowres there will fix that.
Thanks for the PNG tip! When I deal with PNGs I usually use ImageMagick gives fine control over how many bits-per-pixel and also dithering method, on Androids you want textures to be in a format supported by the graphics chip in hardware in most of the cases that is the ETC format which is a little pain cause it doesn't support alpha( a separate one channel aplha mask is used to blend the base texture in the shader...)
Be sure to use the below coupon code GGEMREEG wich gives you some free gold!
Imagemagick is a open source, lightweight image editor with a trim command. It's not as intuitive or simple as photoshops or even other free apps, but this is the only one I know of.
The tool you're looking for is probably ImageMagick, a collection of commandline tools that will let you do all sorts of image manipulation (including format conversion, cropping, etc.) Here are some details for using crop.
It is packaged for most distros; should be as simple as apt-get install imagemagick on most debian-based distros.
Imagemagick will let you script the bulk of this work. If you're looking for PDF output, scantailor might also be worth looking into.
ImageMagick is a generic image read / write / process / convert core C library with wrappers to make it a command line tool or a bolt on library for a number of languages; C, C++, Python, et al.
You might enjoy reading the core read / write routines for the various BMP formats.
It's a simple enough format, it's advantage in a Windows environment is that it's a single system call to xfer .bmp's [memory] <-> [file]. Its disadvantage is that all the world is not Windows.
[](/c00) Personally, I most of the time use imagemagick when I want to do something very simple (like making an animated GIF from a few frames from an episode). Otherwise, GIMP works pretty well, and if you want to make something a little more advanced, the GAP plugin is extremely useful. It's a bit hard to use at first, but once you get used to it, it works nicely!
You can also use other tools for example imagemagick http://www.imagemagick.org/script/index.php copy all pics in one folder and the create the out jpg with this command:
convert *.jpg -evaluate-sequence median OUT.jpg
Credit to this guy: https://patdavid.net/2013/05/noise-removal-in-photos-with-median_6/
Do you know what format the huge image is in? Is it a standard image format? How big is the file?
You could probably use some open source tools like the "stream" command in ImageMagick: http://www.imagemagick.org/Usage/basics/#stream
If you have a huge jpeg, you might also try the "jpegtran" tool (https://linux.die.net/man/1/jpegtran). You probably want something like jpegtran -crop WxH+X+Y input.jpg > output.jpg
I fear you will soon be a subject of techsupporttales. First, a terrabyte drive is like $60? So make a backup before you eff with it.
Then if you need to reduce resolution and or decrease quality, there's plenty of programs that will do it without converting to pdf. Here is one http://www.imagemagick.org/script/index.php
If you are on a Unix system, you could dig around imagemagick (called through convert) and something along the line of -ordered-dither and the further down part about combining it to an image. That way you could simply get a low res noise texture as a basic and use it to dither into a high res texture, allowing you to work from a conventional image. Playing with the -ordered-dither may let you work out the downgrading as much as playing with the noise value of the base image.
The great point of this method, through requiring trial and error, undoubtedly, is that once you are fine with the result, you can just automate it for any number of textures and make it move them to the project folder without troubles (hell, you could even start the thing as a background process, drop images into some folder and simply switch back to godot and directly work on the modified versions)
But you are likely to need a todo list for small fixes later on, when specifics images aren't good enough. It should still be a massive time saver.
We have an uncommonly long dry and warm period in Bonn for the last two weeks and although nights (astronomical dark) are short, I managed to get little more than 2 hours of good data. I really like this nebula because you can see all kinds of shapes in it. A bunny to the left, two jumping frogs more to the center, a wolf/dog with wide spread mouth right of the center and the "Elephant Trunk" to me looks much more like a nomad stepping out of a dust cloud. I do not know why my imagination runs so wild with this very nebula but I like it :) CS, Ben
Acquisition:
Processing Details:
You could use ImageMagick with a command to crop the images.
For converting Minecraft skins from 1.8 to 1.7.10 formats, try:
convert %~n1%~x1 ( +clone -crop 24x16+16+32 ) -geometry +16+16 -composite^ ( +clone -crop 16x16+40+32 ) -geometry +40+16 -composite^ ( +clone -crop 16x16+0+32 ) -geometry +0+16 -composite^ -crop 64x32+0+0 1.7.10.%~n1.png )
Save this in conv.bat
, inside of the directory where where your skin files are. This is assuming that ImageMagick is in your PATH.
WARNING: DO NOT RUN RANDOM BATCH FILES PEOPLE GIVE YOU OVER THE INTERNET UNLESS YOU HAVE THE EXPERTISE TO CHECK THEM FOR MALICIOUS COMMANDS.
ImageMagick commands typically aren't malicious, but you may want to look over the docs to check for yourself.
Next, put the following code in loop.bat
:
FOR /R %%f IN (*.png) DO ( conv.bat "%%f" ) PAUSE
Put loop.bat
inside of the same directory as conv.bat
and your skin files.
Then, double-click loop.bat
. Make sure that only the skins that you want to convert are in the same directory as the batch file.
And voila! Your new skin filenames should have the general format 1.7.10.<<previous skin name>>.png
.
Without any additional software, you can't. Automator has a crop action provided from the builtin Photos.app and it only crops from a center anchor point to a specific image dimensions or by a percentage.
Photoshop can also do batch actions like this, but Photoshop is kinda expensive to subscribe to for infrequent one-off needs. If you own (or buy) Pixelmator, it will install additional Automator actions, including its own Crop action which lets you crop to a specific image size but also lets you choose your anchor point. You'd have to do a double pass to trim different pixel amounts of the top and bottom though, and all the images would need to be the same dimensions first (which you could automate).
A free (but more technical) option would also be to install ImageMagick, which will provide you the command line tool convert
. You'll have to reference the docs for cropping. See this link for additional info.
If you just used basic GPU downsampling in hardware (bilinear), then resolutions larger than 2x native in either dimension (4x total number of pixels) would be useless.
I assume they now use a different resampling method (such as bicubic or lanczos).
More information: http://www.imagemagick.org/Usage/filter/
I built something like this a while back. Nothing I could find came close to what I actually needed so I just rolled my own.
I relied heavily on imagemagick.
User types in text -> send to server, make and save preview image (using imagemagick's "fit to image" ) -> return to client -> add image to your design area.
I used jquery's draggable to then allow the user to move around.
When they're done and they hit submit, I get the x,y coords of the image and use that to create the final, print ready image on my server.
You can also use jquery's resizable.
All calculations are basically just ratios. If the preview "design area" is 300 px square and the final print ready image is 3000px sq then if a preview text image was 30px wide and offset 10px from the left, the final text image needs to be 300px wide and offest 100px.
The same concept for images. And then there's font, colors, weight. I used google fonts. You can download the ttf files and have them on your server for imagemagick to use.
Imagemagic can do this with ease. Use "convert" like here http://www.imagemagick.org/Usage/layers/#append
convert 1.gif 2.gif +append output.gif
If you're on windows you'll need to install cygwin. I don't have any experience with it so I don't have more help than that.
If you figured it out or are on Linux/OSX, install imagemagick and download the script.
Make it executable by running
>chmod +x /path/to/script
The commands to actually make images are on github
If you aren't familiar with the terminal, all this isn't very easy to make sense of and really isn't worth the effort for just this script. All it does is make editing automatic for a few layouts.
If you want to make a texture atlas use a tool such as Texture Packer (this one is paid but I'm sure there are free alternatives).
If all you want is to merge both images into one, then use a photo editing application, such as Gimp.
If you want to do this programatically (e.g. through a shell script), there are many command line image editing tools, such as Image Magick.
Have you tried ImageMagick (Specifically, the "convert" tool).
Chances are good that it's already installed on your system, and if not, there's definitely a package for it.
I actually just found the -draw option of IM, exactly what I want.
The code/random numbers aren't a problem, thanks for the hint, though. As for setter, I prefer hsetroot or FVWM's build in functionality.
Sounds like ImageMagick will do the trick. For random numbers, this quick google search helped me out. Also, you might already know this, check out feh to actually set the wallpaper.
ImageMagick has probably done the most of any image manipulation software to support and advocate gamma-correct/linear-light operation. Their documentation acts as a good reference for how and why it's important, particularly for operations where almost no other software bothers like resizing.
Duplicate of: Imagemagick: Convert to fixed height, proportional width
http://www.imagemagick.org/script/command-line-processing.php#geometry
xheight Height given, width automagically selected to preserve aspect ratio.
Wooow, awesome. More of what I like! :D
Imgur mirror: http://imgur.com/a/0d3B2
^(Hopefully these ones work fine; I ran them through) ^<code>convert</code> ^(to reencode them. :3)
about fetching the images, use Perl and WWW::Mechanize or simply LWP
about rejoining the images, read here
convert rose: -crop 20x20 +repage +adjoin rose_tiles_%02d.gif montage -mode concatenate -tile 4x rose_tiles_*.gif rose_rejoined.gif
good luck with your project, and always use Perl.
The ungraceful way to go about it, and the only way I can possibly think of, would be to convert (or better yet, find) your ebook in PDF format, and manually invert the colors of all the pages.
You can use a command-line program like Imagemagick to do this relatively painlessly, but Kindles are kinda slow at handling pdfs, and you'd need both the original book and the inverted copy on the kindle to switch between.
Like I said, ungraceful. But I think it's your only option other than just dealing with the black on white.
Do all subdirectories have files in them, or are there directories with just subfolders? I quickly threw together a script that will parse through all folders and join the jpgs into one pdf per folder (named the foldername) but it currently throws an error when it hits a subfolder that does not have any files in it (but it will still continue with any subfolders, even after this error). It is extremely rough and if I had any more time, I would fix that error, but it should be a good starting point for you, if you want to use it.
@ECHO OFF FOR /R %%G in (.) DO ( Pushd %%G convert *.jpg -adjoin %%~nG.pdf Popd )
This requires ImageMagick be installed on your machine.
http://www.imagemagick.org/script/binary-releases.php#windows
In powershell.exe
cd path-to-your-files Get-ChildItem -Recurse -Include *.icon | Foreach-Object { path-to-imagemagick\convert.exe $.fullname ($.DirectoryName+'\folder.jpg') }
This would automatically convert all your .icon files to jpgs. If you have any questions feel free to ask me or /r/powershell.
Imagemagick can do this. It has interfaces for pretty much every major language/platform so you can have it run a conversion every time one is uploaded. You can use the command line to batch convert all the existing images.
Use ImageMagick like this instead? Then once you have the right "formula" for one file, it's just a matter of using a for loop (even Windows .BAT files can do that).
Like /u/public_radio posted, you can use a layer list drawable to achieve that effect. Layer list drawables are pretty versatile; I've used them in projects at work to add a nice gradient effect in addition to the rounded corners and other nuances.
Not only can they be used in Android projects, but you can even write a simple function to save each layer to a file, pull them to your workstation and use them on other platforms (iOS in my case). I worked on a project that required the application to be on both platforms and I wasn't able to get the gradient effect verbatim in GIMP/Photoshop. I used ImageMagick to combine each saved layer the way I wanted them and I was able to use the image in iOS. There may have been a way to reproduce this in GIMP/Photoshop, but I'm not an expert with those tools and I was on a strict schedule. One thing I can't recall about this is the resolution of the image output, so depending on your requirements YMMV.
ImageMagick: http://www.imagemagick.org/
Android drawable resource guide: http://developer.android.com/guide/topics/resources/drawable-resource.html
Converting arbitrary images from raster to vector format is kindof hard. There's software to do it, like Adobe Streamline, or AutoTrace.
Your best bet might be to install ImageMagick, and use Paperclip to act as an interface to that. Once you have that up and running, you can look into using a raster-to-vector conversion program.
Here's some documentation on the ImageMagick site on doing that: http://www.imagemagick.org/Usage/transform/#edge_vector
If you're cool with console apps, I suggest ImageMagick. It includes a tool for montage creation. I've never used it for randomly rotated pics, but it seems possible, check this tutorial.
ImageMagick (through the convert
tool) can do some creative things to compress video gifs, including delta compression using transparency, dithering, etc. Not all of it is suited for automated scripts, though, as sometimes it's a judgment call when it comes to resultant quality.
Here is one tutorial, although there are more out there if you want to look for them.
You might give Converseen a try. It's free open source software and uses ImageMagick, which can do just about anything you can imagine to images.
There's a -append argument that might be useful: http://www.imagemagick.org/Usage/layers/
But if you want something that processes an arbitrary number of images, you might have to do some programming.
NetPBM http://netpbm.sourceforge.net/
OR
ImageMagick http://www.imagemagick.org/script/index.php
Both tools have support on a large number of operating systems. Just google the tool name and TGA to JPG.
Take a look at ImageMagick: http://www.imagemagick.org/script/api.php#java
Java API: http://www.imagemagick.org/script/index.php
It will do everything you need, plus a lot more. I believe that flickr use it (or a branch of it) behind the scenes.
I used it (from C#) for a project at work. It's been live for over 2 years, and processes several thousand images a day. We've never had a single problem.
IIRC, you can't compile \includegraphics{*.eps} with pdflatex
, but only with latex
& dvipdf
.
If you want to compile a tex file with some .eps in it, your options are to use latex
& dvipdf
or to convert the eps into something else.
If you want to convert it, you should probably use ImageMagick. A simple
convert image.eps image.png
should work, but might yield something rather pixelated.
Of course, if you want to include both eps and {png,pdf,gif…} in one TeX document, you're going to have to convert.
No Photoshop, just ImageMagick. Because the source images were perfectly consistent, it only took me about 20 minutes to prepare that flair. ImageMagick has a great little program called montage
which can be used for creating the sprite sheet.
montage icons/*.png -background none flair-large.png
Happy with that, I scaled the result down with convert
. It's 4 images wide and I wanted 16x16 sprites, so it needs to be 64 pixels wide total,
convert flair-large.png -resize 64 flair.png
To add more factions, I just need to find good source images, crop/resize them to consistency, then write a tiny Perl script to glue all this together, generating the required CSS. I'll put it all into a Git repository for safekeeping.
So if anyone wanted to help, just find me faction icons with transparent backgrounds (i.e. PNG or SVG), square image sizes, and no borders. A perfect example.
I see that you have it working already but for future reference, ImageMagick is a very powerful set of command-line tools that can do all sorts of image manipulation. In your case, composite would do what you need.
If you are a command line junkie, ImageMagick is the way to go.
mogrify -path [output directory] -resize 1024x768 *.jpg
It will preserve aspect ratio and make the images fit in the box. Be sure to specify the -path option or it will over-write the existing images.
You might find this to be useful,
http://imagemagick.org/script/index.php
This usage page talks about creating a set of graphics with a consistent look/feel for a site,
IMHO the better IDE environments are layered over a literate CLI (command line interface) to the actual functionality, whatever that may be.
In other words everything that can be achieved via a GUI point and grunt interface can also be achieved via scripting / typing.
When that type of separation between action and intent is achieved many things become simpler.
One example you might want to look at is the ImageMagick library - it's a rich set of image manipulation functions with an API that lends itself well to being callable as library functions, scripted as CLI commands or driven by events from a GUI.
The take home point from this is to separate the GUI form from the core function, if that's achieved the GUI framework can be (relatively) easily be swapped out from something butt ugly in TCL/TK to something hip in <buzzword>script / flashywebkit
ImageMagick here all the way. From what you wrote, it sounded like the jagged results you were getting were from Gimp, not from ImageMagick, but in case you want to know more about the ImageMagick options for resizing, Google "ImageMagick examples" to find this:
http://www.imagemagick.org/Usage/resize/#resize
Plenty of good stuff there. HOLY CRAP LOOK AT THAT THEY ADDED LIQUID RESCALE! YES!
Whew, excuse me while I calm down. Thank you for sending me to that page today.
But if you just want a shorter example, the ImageMagick command I use is:
convert -geometry 1024x768 -quality 100 infile.jpg outfile.jpg
you probably don't want to use quality 100, that's kind of ridiculous.
Usually I do this kind of thing with for loops that do all the files in a directory, and put them in some other directory. So on unix:
for n in *.jpg; do convert -geometry 1024x768 -quality 100 $n resized/$n; done
don't ever overwrite your original file. I don't use the ImageMagick 'mogrify' command for that reason, only convert.
OK now I'm off to google to find out what 'libre photography' is. I guess it's something about using free tools?
The trick is, don't do it with text. There's a library/commandline tool called ImageMagick (http://www.imagemagick.org/). Get the text you want, and send it through imagemagick (http://www.imagemagick.org/Usage/text/ for how to deal with text conversion)
It's not easy, it'll require a ton of trial and error, but you can do some pretty kickass stuff with it. i.e. this video that I ran into (http://www.youtube.com/watch?v=U9gNyiIxD_I) was created with imagemagick