A big success at TGS2016! We'll show you behind the scenes of the photo article

Hello.
I'm Mandai, the Wild team member in charge of development.

This happened a little while ago, but we exhibited at TGS2016's business day again this year as Beyond. It was a
great success, and we would like to thank everyone who visited our booth.

Meanwhile,this isdoing.

I had bought a large number of images, but when I tried to upload them, I hit the file size limit (I borrowed my wife's SLR camera, so the image quality was unnecessarily good), and after thinking about what to do, I came up with a solution in a snappy, engineer-like way, which is the purpose of this post

Of course, I put a separate, specially prepared SD card in my wife's digital camera and, for the sake of domestic safety and to prevent any potential conflicts, I distributed the photos to the office and deleted them.
This is truly the age of the information society, isn't it!

Speaking of resizing

This time I did such a good job that I have over 200 photos, so the first hurdle is how to display them on the blog

Do you want to become a Photoshop expert by resizing each image individually using Photoshop or whatever? So, you can just convert them all at once using ImageMagick

Fortunately, my home PC runs Ubuntu, so I have ImageMagick installed

But it's 2am

But everyone is asleep

But I have work tomorrow too

But, but... I have no choice but to do it

So I started working slowly

 

The most basic of basics: resizing

When you install ImageMagick, several commands are installed, but this time we will use the convert command to resize the image

is the image information before usehere.

If you look at the image information using the identify command, it will look something like this:

identify kakkoii.jpg kakkoii.jpg JPEG 4288x2848 4288x2848+0+0 8-bit DirectClass 5.817MB 0.000u 0:00.000

As you'd expect from a SLR, it takes beautiful, detailed photos

Well, he's just an old man holding a gun

With a width of 4288 pixels, it's practically unsuitable for web use.
You can't display it at its original size unless it's at least 1/4 of its width, around 1244 pixels, so viewing it in a browser is a waste of data.

Considering the layout of the homepage, I think it would be good to reduce the size to 20% this time

With this in mind, let's try converting it in one go

convert kakkoii.jpg -geometry 20% t1.jpg

There are several ways to resize using the convert command. You can use the -geometry option, as in this case, or you can use the -resize option

If you use the -resize option, it will look like this:

convert kakkoii.jpg -resize 20% t2.jpg

The position and formatting of the options are the same.
When it comes to resizing, I think the -resize option is superior because it's more intuitive and easier to remember.

Let's look at the information about the images created using each method

identify t1.jpg t1.jpg JPEG 858x570 858x570+0+0 8-bit DirectClass 426KB 0.000u 0:00.000 identify t2.jpg t2.jpg JPEG 858x570 858x570+0+0 8-bit DirectClass 426KB 0.000u 0:00.009

They are exactly the same.
In fact, the sizes are exactly the same as well. Running the cmp command also shows no differences.

I've gone off on a tangent here, but if you loop the above convert command and apply it to all the files in the directory, you'll have image data for your blog in no time

By the way, there is also the mogrify command for bulk conversion, but since it rewrites the original data, we did not use it this time

If you want to convert in bulk using mogrify, it will look like this:

ls -al total 28448 drwxrwxr-x 2 vagrant vagrant 4096 Oct 4 17:31 . drwxrwxr-x 3 vagrant vagrant 4096 Oct 4 17:31 .. -rw-rw-r-- 1 vagrant vagrant 5816548 Oct 4 13:00 1.jpg -rw-rw-r-- 1 vagrant vagrant 5816548 Oct 4 13:00 2.jpg -rw-rw-r-- 1 vagrant vagrant 5816548 Oct 4 13:00 3.jpg -rw-rw-r-- 1 vagrant vagrant 5816548 Oct 4 13:00 4.jpg -rw-rw-r-- 1 vagrant vagrant 5816548 Oct 4 13:00 5.jpg mogrify -resize 20% *jpg ls -al total 2108 drwxrwxr-x 2 vagrant vagrant 4096 Oct 4 17:31 . drwxrwxr-x 3 vagrant vagrant 4096 Oct 4 17:31 .. -rw-rw-r-- 1 vagrant vagrant 426200 Oct 4 17:31 1.jpg -rw-rw-r-- 1 vagrant vagrant 426200 Oct 4 17:31 2.jpg -rw-rw-r-- 1 vagrant vagrant 426200 Oct 4 17:31 3.jpg -rw-rw-r-- 1 vagrant vagrant 426200 Oct 4 17:31 4.jpg -rw-rw-r-- 1 vagrant vagrant 426200 Oct 4 17:31 5.jpg

There was also no difference when compared to the one converted using the convert command

In the end, it turned out that it was the image selection rather than the image conversion that took the most time

which took quite a bit of time to capture, as I only have images availablemy photos from Tokyo Game Show 2016,Please also check out

That's all

If you found this article helpful,please give it a "Like"!
0
Loading...
0 votes, average: 0.00 / 10
288
X Facebook Hatena Bookmark pocket

The person who wrote this article

About the author

Yoichi Bandai

My main job is developing web APIs for social games, but thankfully I'm also given the opportunity to work on various other tasks, including marketing.
My image rights within Beyond are treated as CC0.