Mercurial > hg > orthanc-book
comparison Sphinx/source/users/rest.rst @ 910:888df946c1be
preview quality
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 25 Jan 2023 14:15:03 +0100 |
parents | f72b2dd172da |
children | 6474e299918b |
comparison
equal
deleted
inserted
replaced
907:7ccecfb76428 | 910:888df946c1be |
---|---|
406 The resulting image will be a standard graylevel PNG image (with 8 | 406 The resulting image will be a standard graylevel PNG image (with 8 |
407 bits per pixel) that can be opened by any painting software. The | 407 bits per pixel) that can be opened by any painting software. The |
408 dynamic range of the pixel data is stretched to the [0..255] range. | 408 dynamic range of the pixel data is stretched to the [0..255] range. |
409 An equivalent JPEG image can be downloaded by setting the `HTTP header | 409 An equivalent JPEG image can be downloaded by setting the `HTTP header |
410 <https://en.wikipedia.org/wiki/List_of_HTTP_header_fields>`__ | 410 <https://en.wikipedia.org/wiki/List_of_HTTP_header_fields>`__ |
411 ``Accept`` to ``image/jpeg``:: | 411 ``Accept`` to ``image/jpeg``. By default, the jpeg quality is set to |
412 90% but this can be specified in the url:: | |
412 | 413 |
413 $ curl -H 'Accept: image/jpeg' http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/preview > Preview.jpg | 414 $ curl -H 'Accept: image/jpeg' http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/preview > Preview.jpg |
415 $ curl -H 'Accept: image/jpeg' http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/preview?quality=80 > Preview80.jpg | |
414 | 416 |
415 If you don't want to stretch the dynamic range, and create a 8bpp or | 417 If you don't want to stretch the dynamic range, and create a 8bpp or |
416 16bpp PNG image, you can use the following URIs:: | 418 16bpp PNG image, you can use the following URIs:: |
417 | 419 |
418 $ curl http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/image-uint8 > full-8.png | 420 $ curl http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/image-uint8 > full-8.png |