WebChemistry / images

Image storage for Nette Framework
36 stars 20 forks source link

Keep image quality #8

Closed wohral closed 8 years ago

wohral commented 8 years ago

Is there any way, to keep image quality and ignore Image compression?

MartkCz commented 8 years ago

only locally.

Uploading: (more here)

$image = $this->imageStorage->createImage();
$image->setQuality(100);
// ...
$image->saveUpload(new Nette\Http\FileUpload);

Link:

$image->get('namespace/image.jpg')->setQuality(100)->getLink();

In future I probably prepare feature, which allow sets different options for namespace.

namespace:
  quality: 100
  allow:
    - 250x100
    - 300x50
  callback:
  ## ...
MartkCz commented 8 years ago

Now, you can change quality globaly: https://github.com/WebChemistry/Images/blob/master/manual/cs/configuring.md