Модераторы: Aliance, skyboy, MoLeX, ksnk
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> imagemagick-ом получить уменьшеную картику лучшего 
:(
    Опции темы
mstdmstd
Дата 1.4.2016, 09:35 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 394
Регистрация: 30.12.2008

Репутация: нет
Всего: нет



Всем привет,
Нужно сделать из большого png-файла файл поменьше максимального качества - даже если он будет больше размером
Я использую команду imagemagick вида:
Код
/usr/bin/convert -sample 1201x847 -density 600   "source_file.png"  -quality 100   "dest_file.png"
Получаю исходный файл но качество хотелось бы получше...

размер выходного файла я задаю явно  -sample 1201x847
Понятен параметр  -quality 100 - лучшего качества

Сложнее с параметром density 
В доке читаю:
Цитата
-density width
-density widthxheight
Set the horizontal and vertical resolution of an image for rendering to devices.
This option specifies the image resolution to store while encoding a raster image or the canvas resolution while rendering (reading) vector formats such as Postscript, PDF, WMF, and SVG into a raster image. Image resolution provides the unit of measure to apply when rendering to an output device or raster image. The default unit of measure is in dots per inch (DPI). The -units option may be used to select dots per centimeter instead.
The default resolution is 72 dots per inch, which is equivalent to one point per pixel (Macintosh and Postscript standard). Computer screens are normally 72 or 96 dots per inch, while printers typically support 150, 300, 600, or 1200 dots per inch. To determine the resolution of your display, use a ruler to measure the width of your screen in inches, and divide by the number of horizontal pixels (1024 on a 1024x768 display).
If the file format supports it, this option may be used to update the stored image resolution. Note that Photoshop stores and obtains image resolution from a proprietary embedded profile. If this profile is not stripped from the image, then Photoshop will continue to treat the image using its former resolution, ignoring the image resolution specified in the standard file header.
The -density option sets an attribute and does not alter the underlying raster image. It may be used to adjust the rendered size for desktop publishing purposes by adjusting the scale applied to the pixels. To resize the image so that it is the same size at a different resolution, use the -resample option.

Надо ли понимать что нужны параметры монитора клиента screen.width  и  screen.height ?
Так как написано:
Цитата
use a ruler to measure the width of your screen in inches, and divide by the number of horizontal pixels (1024 on a 1024x768 display
Не очень понятно какие параметры имеют в виду и как это подсчитать...

Гугля вижу использование параметров вроде sharpen, trim - не очень понятно имеют ли они отношение к качечтву картинок?
Также непоняно  нужно ли использовать параметр resample если я размер получаемого файла определяю как -sample 1201x847
Как получить картинку более высокого качества?
PM MAIL   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | PHP: Графика | Следующая тема »


 




[ Время генерации скрипта: 0.1010 ]   [ Использовано запросов: 21 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.