lightroom – Convert a large database of mixed format files to JPEG files

If you have the technical skills to install Python3 and the Python imaging library on your computer, you can use this Python script:

# !/usr/bin/python3
import os
import sys
from PIL import Image

size = 128, 128

def thumbnail(fromFile,  toFile):
    _, ext = os.path.splitext(fromFile)
    if ext.lower() in ('.jpg', '.jpeg', '.png'):
      print('Creating thumbnail', toFile)
      im = Image.open(fromFile)
      im.thumbnail(size)
      im.save(file + ".thumbnail", "JPEG")

(_, fromDir, toDir) = sys.argv
for root, dirs, files in os.walk(fromDir, topdown=True):
   for name in dirs:
      toPath = os.path.join(toDir, root, name)
      print('Making', toPath)
      os.makedirs(toPath, 0o777, True)

   for name in files:
      fromFile = os.path.join(root, name)
      toFile = os.path.join(toDir, root, name)
      thumbnail(fromFile,  toFile)

Run it like this: python3 scriptname sourcedir destdir

Remember that sourcedir must be a relative path. If you have a file named /usr/traveler/mystuff/images/2009/Mar/IMG3.jpg, go to the directory /usr/traveler/mystuff, and uses python3 scriptname images thumbnails, the output will be in /usr/traveler/mystuff/thumbnails/images/2009/Mar/IMG3.jpg

nikon – How to convert JPEG to RAW in Photoshop or similar?

You cannot (should not) produce a crude from a jpeg. Theoretically, this would be possible because the compressed NEF is based on a TIFF container and a "large" JPEG / JFIF IIRC variant.

And all is not lost because, after having organized this kind of competitions, I can say that you can always participate according to the type of competition and why they want raw files …

The requirement may be there because the contest is for unmodified images – this is common with photojournalism contests where only general or minor changes are allowed.

More likely, the requirement is there to discourage cheating, which has plagued the amateur / competitive world. Assuming everyone takes raw photos (and some people don't – and no, I never understood that), organizers often allow you to provide the original unmodified jpeg on which you based input because actual inputs are usually requested at a specific pixel size.

Some organizations post such requirements under the guise of “ quality '', although this is mainly false because (even now) few devices are able to go beyond 8 bits per channel. From my observation, it is mainly to keep "beginners" at bay. From experience, I have seen many events request a 24/48 bit lossless RGB TIFF for display then on a horrible DLP projector that does not have the tonal response to make a calibration worthy of. # 39; be tempted (if they had attempted one, which is much less likely than you might think).

In any case, even if the rules are listed, they are generally aimed at maintaining fairness and will have a reservation that the organizers have discretionary power over submissions. You must contact the organizers and explain to them that your original has been shot in JPEG as they can always allow you to enter.

And good luck in the competition!

linux – How to serve nginx progressive jpeg well?

I have a progressive JPEG that I am trying to use in my test website (localhost). But it does not seem to show the low resolution image at high resolution. The image simply appears even when the bandwidth is limited. From the test I did, it seems like the problem is on my nginx server, I don't know if it's the configuration or the server itself.

Here is the test I did which gives negative results

Here is my nginx configuration file:

worker_processes 32;
worker_rlimit_nofile 524288;
events
{
    use epoll;
    worker_connections  100000;
    multi_accept on;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    open_file_cache max=100000;
    keepalive_requests 100000;
    keepalive_timeout 30;
    index index.php;
    server {
        listen 127.0.0.1:443 ssl http2;
        server_name    static.example.com;
        root "/static/root";
        ssl_certificate "/static/server/cert.cer";
        ssl_certificate_key "/static/server/key.key";
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout 5m;
        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;
        fastcgi_hide_header Set-Cookie;
        location ~* .(?:png|jpeg|jpg)$ {
            expires 30d;
            add_header Pragma public;
            add_header Cache-Control "public";
            add_header Accept-Ranges bytes;
        }
    }
}

SYSTEM: CentOS 8.1 PHP 7

Did I miss something?

server – How to serve nginx progressive jpeg well?

I have a progressive JPEG that I am trying to use in my test website (localhost). But it does not seem to show the low resolution image at high resolution. The image simply appears even when the bandwidth is limited. From the test I did, it seems like the problem is on my nginx server, I don't know if it's the configuration or the server itself.

Here is the test I did which gives negative results

Here is my nginx configuration file:

worker_processes 32;
worker_rlimit_nofile 524288;
events
{
    use epoll;
    worker_connections  100000;
    multi_accept on;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    open_file_cache max=100000;
    keepalive_requests 100000;
    keepalive_timeout 30;
    index index.php;
    server {
        listen 127.0.0.1:443 ssl http2;
        server_name    static.example.com;
        root "/static/root";
        ssl_certificate "/static/server/cert.cer";
        ssl_certificate_key "/static/server/key.key";
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout 5m;
        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;
        fastcgi_hide_header Set-Cookie;
        location ~* .(?:png|jpeg|jpg)$ {
            expires 30d;
            add_header Pragma public;
            add_header Cache-Control "public";
            add_header Accept-Ranges bytes;
        }
    }
}

SYSTEM: CentOS 8.1 PHP 7

Did I miss something?

Does opening and closing a JPEG file simply decrease the quality of the image?

Interesting answer sets. But some are still a bit misleading. I will try to summarize.

Absolutely not

1) Opening a file does not affect it in any way. Also closing it. Not in a viewing or editing program.

You may see the file differently in different programs, but it may be because that program interprets certain information such as color mode or color profile. But this process only reads it.

There is a chance of small changes

2) Perform lossless operations, such as rotating an image. Normally, programs simply order data from a jpg file, without parsing or recompressing. But I would not get my hands on the fire for all the programs that suppose to do so.

Small harmless changes

3) Open and save with the same compression on the same program.

A first recompression is performed the first time you save a jpg file. If you save the file a second time with the same settings, the original data loss is already done, but small changes can be applied again. Not to the same extent as the first, but it can be done multiple times. But it depends on the program.

Notable changes

4) The most obvious is saving with a different compression setting.

Not only on the "scale" of everything the program has, but also on the algorithm used. It's a bit too technical but there are at least two main 4: 4: 4 and 4: 2: 2 compression algorithms.

You can use your program's "slider" to get higher "quality", but if your program uses 4: 2: 2 and the original was 4: 4: 4, you will have significant data loss .

Here is a little paper I made a few years ago so you can see what this data loss means, it's in Spanish but you can use google translate: http://otake.com.mx/ apuntes / PruebasDeCompresion2 / 1-CompresionJpgProceso.htm

A total mess

5) If you open an image and re-record it on a program with limited capacity. For example, a viwer can only save RGB files and does not work properly with CMYK files, or maybe it does not understand the built-in color profile. You could totally ruin your image when saving.

6) Using a lot of compression. You save it for your website and compress it. Do not delete your originals!

Only on the edited part of the image

seven) Recompression is normally performed on the entire image, but as I mentioned in point 3, it is not much if the image has not changed. When you modify an image, this analysis must be carried out again on this modified part.

Remember that a change can be classified into three groups.

a) Corrections of colors, contrast, etc.

b) Modify part of an image (red eyes, remove a person, clean unwanted spots)

c) A completely new collage.

So in some cases the picture is totally different, at least from the point of view of analisis and recompression.

In this article: https://photo.stackexchange.com/a/67434/37321, the user mentioned a program that makes a very clever analysis of the existing compression and does not recompress it if it is not. is not necessary.

How to use the Huffman table in jpeg compression?

I am trying to understand jpeg by implementing a simple version in python. i have a 8-bit 256x256 grayscale image (.bmp file), I cut it into 8×8 blocks giving me a size table (4096,8,8). On these blocks, I apply the DCT before and I quantify them using the quantification tables that I found on the Internet. That leaves me with blocks like:

((82  2  1  0  0  0  0  0)
 ( 3  0  0 -1  0  0  0  0)
 (-1  0 -1  0  0  0  0  0)
 ( 1  0  0  0  0  0  0  0)
 ( 0  0  0  0  0  0  0  0)
 ( 0  0  0  0  0  0  0  0)
 ( 0  0  0  0  0  0  0  0)
 ( 0  0  0  0  0  0  0  0))

I store these blocks in a zigzag shape zz:

(82  2  3 -1  0  1  0  0  0  1  0  0 -1 -1  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0)

zz(0) is my DC coefficient and zz(1:) are my AC coefficients. After that according to the JPEG standard, I differentially encode the DC coefficients, while the AC coefficients are coded in length. The following is the result of the coding length of the examples of AC coefficients above. It is in shape (symbols, values) or symbols are tuples (runlength,bits) and values are binary representations of the size bits

(((0, 2), (0, 2), (0, 1), (1, 1), (3, 1), (2, 1), (0, 1), (0, 0)), ('10', '11', '0', '1', '1', '0', '0', ''))

After that, I'm supposed to use the Huffman tables (given in Table K.5 in the standard) to get the final bitstream. I do not understand how it is done. for example, in this current 8×8 block, I have the AC coefficients above, the first one has the symbol (0,2) and the value & # 39; 10 & # 39;, does that mean that I use the code word & # 39; 01 & # 39; of the Board? In this case, the same will be used for the second AC coefficient since its symbol is also (0.2), but the value is & # 39; 11 & # 39 ;. If so, how to reverse the effect when decoding?

Huffman table

fujifilm – Fuji X100s: Why are the high ISO settings (> 6400) only available in JPEG and not in RAW?

While reading an article on the Fuji X100s, I came across this quote:

[…] the high ISO setting is only available when shooting in Jpeg Fine format. When shooting in Raw mode, the highest ISO setting is 6400.

The camera has the highest nominal ISO of 25600, so I was wondering why ISO settings higher than 6400 are only available in JPEG. Are 25600 ISO JPEG photos only the result of internal processing of 6400 ISO photos?

I really like the Fuji X100 and it would have already landed in my basket if I could afford it :-]

How can I display the color profile of each jpeg in a folder?

I need to find the color profile of each jpeg in a folder so that I can determine which ones I want to modify. Can I list them in batches? I don't have Photoshop.

Can Mac preview be set by default to save image in JPEG format [duplicate]

The default preview is saving in PNG format. I can change PNG to JPEG, but I have to do it every time.

Is there a way to change the default behavior.

Current of Yosemite.