{"id":36971287,"url":"https://github.com/dnsimmons/imager","last_synced_at":"2026-01-13T21:53:06.236Z","repository":{"id":56970480,"uuid":"124498811","full_name":"dnsimmons/imager","owner":"dnsimmons","description":"Imager is a Laravel package simplifying image processing operations using PHP's native GD library extension.","archived":false,"fork":false,"pushed_at":"2020-06-29T04:45:15.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T15:54:42.155Z","etag":null,"topics":["gd","image-manipulation","image-processing","laravel","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnsimmons.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-09T06:37:13.000Z","updated_at":"2024-03-04T14:28:40.000Z","dependencies_parsed_at":"2022-08-21T10:50:51.585Z","dependency_job_id":null,"html_url":"https://github.com/dnsimmons/imager","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dnsimmons/imager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimmons%2Fimager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimmons%2Fimager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimmons%2Fimager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimmons%2Fimager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnsimmons","download_url":"https://codeload.github.com/dnsimmons/imager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimmons%2Fimager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28401231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gd","image-manipulation","image-processing","laravel","php"],"created_at":"2026-01-13T21:53:05.498Z","updated_at":"2026-01-13T21:53:06.223Z","avatar_url":"https://github.com/dnsimmons.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Imager\n\n[![Latest Stable Version](https://poser.pugx.org/dnsimmons/imager/v)](//packagist.org/packages/dnsimmons/imager) \n[![Latest Unstable Version](https://poser.pugx.org/dnsimmons/imager/v/unstable)](//packagist.org/packages/dnsimmons/imager) \n[![Total Downloads](https://poser.pugx.org/dnsimmons/imager/downloads)](//packagist.org/packages/dnsimmons/imager) \n[![License](https://poser.pugx.org/dnsimmons/imager/license)](//packagist.org/packages/dnsimmons/imager)\n\n## About Imager\n\nImager is a [Laravel](http://laravel.com) package simplifying image processing operations using PHP's native GD library extension.\n\n## Install\n\nUse [composer](http://getcomposer.org) to install the package\n\n\tcomposer require dnsimmons/imager\n\nAdd the service provider to your config/app.php along with an alias:\n\n    'providers' =\u003e [\n\t\t...\n        Dnsimmons\\Imager\\ImagerServiceProvider::class,\n\t];\n\n    'aliases' =\u003e [\n\t\t...\n\t    'Imager' =\u003e Dnsimmons\\Imager\\Imager::class,\t\n\t];\n\n## Usage\n\n### Basic Usage\n\nThe basic example provided below takes an input file example.jpg and resizes it to 640 x 480 pixels and then converts it to greyscale before outputting the raw image data to the browser.\n\n**Basic Example**\n\n\t$imager = new \\Imager('path/to/example.jpg');\n\t$imager-\u003eresize(640,480)-\u003egreyscale()-\u003erender();\n\n\nMost of the examples provided in this documentation uses a call to `render()` which will output the image as raw data back to the caller. In the event you wish to write images to disk simply use `write()` and specify the path and filename for the output.\n\n**Render Example**\n\n\t$imager = new \\Imager('path/to/example.jpg');\n\t$imager-\u003eresize(640,480)-\u003egreyscale()-\u003erender();\n\n**Write Example**\n\n\t$imager = new \\Imager('path/to/example.jpg');\n\t$imager-\u003eresize(640,480)-\u003egreyscale()-\u003ewrite('path/to/output.jpg');\n\n### Using Scripts\n\nImager also supports scripted processing using JSON. Let's repeat what we did above but instead deliver it as a script.\n\n**Scripted Example**\n\n\t$imager = new \\Imager('path/to/example.jpg');\n\t$imager-\u003escript('path/to/script.json')-\u003erender();\n\nHere is our example commands script (script.json). Parameters are supplied in the same order as required by the actual methods for a given command.\n\n\t[\n\t\t{\"command\":\"resize\", \"params\":[\"640\",\"480\"]},\n\t\t{\"command\":\"greyscale\", \"params\":[]}\n\t]\n\n## Commands (A-Z)\n\n**anaglyph**( )\n\nApplys a stereo 3D anaglyph effect to an image.\n\n\t$imager-\u003eanaglyph()-\u003erender();\n\n\n**blackwhite**( )\n\nConverts an images color to black and white.\n\n\t$imager-\u003eblackwhite()-\u003erender();\n\n**blur**( *integer $level* )\n\nBlurs an image with a given level from 0 to 10.\n\n\t$imager-\u003eblur(1)-\u003erender();\n\n**brightness**( *integer $level* )\n\nAdjust the brightness of an image with a given level from -100 to 100.\n\n\t$imager-\u003ebrightness(50)-\u003erender();\n\n\n\n\n\n**colorize**( *integer $r, integer $g, integer $b* )\n\nApply a color mask to an image with given RGB values from -255 to 255.\n\n\t$imager-\u003ecolorize(128,0,255)-\u003erender();\n\n**convert**( *string $format* )\n\nConvert an image to a specified image format (JPEG, PNG, or GIF).\n\n\t$imager-\u003econvert('JPEG')-\u003erender();\n\n**contrast**( *integer $level* )\n\nAdjust the contrast of an image with a given level from -100 to 100.\n\n\t$imager-\u003econtrast(50)-\u003erender();\n\n**crop**( *integer $x, integer $y, integer $width, integer $height* )\n\nCrops an image with specified width and height in pixels from a given x and y origin point.\n\n\t$imager-\u003ecrop(0,0,320,240)-\u003erender();\n\n\n**desaturate**( *integer $level* )\n\nAdjust the saturation of an image with a given level of 0 to 100.\n\n\t$imager-\u003edesaturate(50)-\u003erender();\n\n\n**emboss**( )\n\nApply a emboss filter to an image.\n\n\t$imager-\u003eemboss()-\u003erender();\n\n**fisheye**( )\n\nApplys a fisheye lens effect to an image.\n\n\t$imager-\u003efisheye()-\u003erender();\n\n**flip**( *string $direction* )\n\nFlips an image either horizontally (h), vertically (v), or both directions (b).\n\n\t$imager-\u003eflip('b')-\u003erender();\n\n**greyscale**( )\n\nConverts an images color to greyscale.\n\n\t$imager-\u003egreyscale()-\u003erender();\n\n**layer**( *string $image_path, integer $opacity* )\n\nLayers an image with a given opacity (from 0 to 100) on top of an image using identical dimensions.\n\n\t$imager-\u003elayer('path/to/layer.png', 50)-\u003erender();\n\n**negative**( )\n\nApply a negative filter to an image.\n\n\t$imager-\u003enegative()-\u003erender();\n\n\n**noise**( *integer $level* )\n\nAdds noise to an image with a given noise level from 0 to ?.\n\n\t$imager-\u003enoise(20)-\u003erender();\n\n**pixelate**( *integer $size* )\n\nApply a pixelation filter to an image with a given pixel size.\n\n\t$imager-\u003epixelate(4)-\u003erender();\n\n**replace**( integer $r, integer $g, integer $b, integer $r2, integer $g2, integer $b2 )\n\nApply a color replacement to an image with given RGB values from -255 to 255.\n\n\t$imager-\u003ereplace(255,0,0,0,0,255)-\u003erender();\n\n**resize**( *integer $width, integer $height* )\n\nResizes an image to specified width and height in pixels.\n\n\t$imager-\u003eresize(640,480)-\u003erender();\n\n**rotate**( *integer $degrees* )\n\nRotates an image by a given number of degrees.\n\n\t$imager-\u003erotate(90)-\u003erender();\n\n**scale**( *integer $width, integer $height* )\n\nScales an image to specified width and height in pixels based on largest dimension keeping aspect ratio.\n\n\t$imager-\u003escale(640,480)-\u003erender();\n\n**sepia**( )\n\nApply a sepia filter to an image.\n\n\t$imager-\u003esepia()-\u003erender();\n\n**sharpen**( *integer $level* )\n\nSharpens an image with a given level from 0 to 10.\n\n\t$imager-\u003esharpen(1)-\u003erender();\n\n**sketch**( )\n\nApply a sketch filter to an image.\n\n\t$imager-\u003esketch()-\u003erender();\n\n**smooth**( *integer $level* )\n\nSmooths an image with a given level from 0 to 100.\n\n\t$imager-\u003esmooth(10)-\u003erender();\n\n**vignette**( *integer $size* )\n\nApplys a vignette effect to an image with a given size of 0 to 10.\n\n\t$imager-\u003evignette(0.4)-\u003erender();\n\n**watermark**( *string $image_path, string $position* )\n\nApplys an image in a given position on top of an image. Possible positions include center, top-left, top-right, bottom-left, and bottom-right.\n\n\t$imager-\u003ewatermark('path/to/watermark.png', 'bottom-right')-\u003erender();\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnsimmons%2Fimager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnsimmons%2Fimager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnsimmons%2Fimager/lists"}