2017 © Pedro Peláez
 

library kartinki

Simple tool for creating previews of images.

image

kartinki/kartinki

Simple tool for creating previews of images.

  • Wednesday, July 27, 2016
  • by happyproff
  • Repository
  • 2 Watchers
  • 2 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 6 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

kartinki

Creating image thumbnails with simple configs like "200x200", "1280x720:fit,quality=75"., (*1)

Latest Stable Version Build Status License, (*2)

Code Climate Scrutinizer Code Quality SensioLabsInsight, (*3)

Requirements

  • PHP 5.4+, 7.0, HHVM
  • GD extension enabled

Installing

  • Add "kartinki/kartinki": "~2.0.0" to composer.json.
  • Run composer install

Simple usage example

filename.jpg is 1600x1200., (*4)

<?php

$config = [
    'square' => '200x200',
    'normal' => '400x400:fit',
    'big'    => '1280x720:fit,quality=100',
];

$result = (new kartinki\Kartinki\Thumbnailer)->createThumbnails(
    '/path/to/image/filename.jpg',
    $config,
    '/output/dir' // optional
);

Thumbnailer will place 3 files to /output/dir:, (*5)

1ceebb2cf4b0425a0ea1e1cb49810a07_square.jpg // 200x200
1ceebb2cf4b0425a0ea1e1cb49810a07_normal.jpg // 400x300
1ceebb2cf4b0425a0ea1e1cb49810a07_big.jpg    // 960x720

And $result will be instanse of kartinki\Kartinki\Result:, (*6)

<?php
$result->getThumbnails();
// [
//     'square' => '1ceebb2cf4b0425a0ea1e1cb49810a07_square.jpg',
//     'normal' => '1ceebb2cf4b0425a0ea1e1cb49810a07_normal.jpg',
//     'big'    => '1ceebb2cf4b0425a0ea1e1cb49810a07_big.jpg'
// ]

$result->getUniqueId();
// '1ceebb2cf4b0425a0ea1e1cb49810a07'

$result->getExtension();
// 'jpg'

Versioning

From version 1.0.0 kartinki uses Semantic Versioning., (*7)

The Versions

27/07 2016

dev-master

9999999-dev

Simple tool for creating previews of images.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

26/07 2016

2.0.4

2.0.4.0

Simple tool for creating previews of images.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

26/07 2016

2.0.3

2.0.3.0

Simple tool for creating previews of images.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

30/08 2015

2.0.2

2.0.2.0

Simple tool for creating previews of images.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

30/08 2015

2.0.1

2.0.1.0

Simple tool for creating previews of images.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

30/08 2015

2.0.0

2.0.0.0

Simple tool for creating previews of images.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

21/08 2015

1.0.1

1.0.1.0

Simple tool for creating previews of images.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

21/08 2015

1.0.0

1.0.0.0

Simple tool for creating previews of images.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

21/08 2015

dev-1.0.0-dev

dev-1.0.0-dev

Simple tool for creating previews of images.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

26/01 2015

0.0.3

0.0.3.0

Simple tool for creating previews of images.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

30/10 2014

0.0.2

0.0.2.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov

30/10 2014

0.0.1

0.0.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stanislav Gamayunov