Giter Site home page Giter Site logo

magick's Introduction

magick

test

Lua bindings to ImageMagick's MagicWand or GraphicsMagick's Wand for LuaJIT using FFI.

Installation

You'll need both LuaJIT (any version) and MagickWand or GraphicsMagickinstalled.

On Ubuntu, to use ImageMagick, you might run:

$ sudo apt-get install luajit
$ sudo apt-get install libmagickwand-dev

You can install GraphicsMagick in place of, or alongside, ImageMagick:

$ sudo apt-get install libgraphicsmagick1-dev

It's recommended to use LuaRocks to install magick.

$ sudo apt-get install luarocks
$ luarocks install magick

Basic Usage

If you just need to resize/crop an image, use the thumb function. It provides a shorthand syntax for common operations.

local magick = require("magick")
magick.thumb("input.png", "100x100", "output.png")

The second argument to thumb is a size string, it can have the following kinds of values:

"500x300"       -- Resize image such that the aspect ratio is kept,
                --  the width does not exceed 500 and the height does
                --  not exceed 300
"500x300!"      -- Resize image to 500 by 300, ignoring aspect ratio
"500x"          -- Resize width to 500 keep aspect ratio
"x300"          -- Resize height to 300 keep aspect ratio
"50%x20%"       -- Resize width to 50% and height to 20% of original
"500x300#"      -- Resize image to 500 by 300, but crop either top
                --  or bottom to keep aspect ratio
"500x300+10+20" -- Crop image to 500 by 300 at position 10,20

If you need more advanced image operations, you'll need to work with the Image object. Read on.

Functions

All functions contained in the table returned by require("magick").

thumb(input_fname, size_str, out_fname=nil)

Loads and resizes image. Write output to out_fname if provided, otherwise a string is returned with the binary data of the resulting image. (input_fname can optionally be an instance of Image)

size_str is a described above under thumb.

load_image(fname)

Return a new Image instance, loaded from filename. Returns nil and error message if image could not be loaded.

load_image_from_blob(blob)

Loads an image from a Lua string containing the binary image data.

Image object

Calling load_image or load_image_from_blob returns an Image object.

local magick = require "magick"

local img = assert(magick.load_image("hello.png"))

print("width:", img:get_width(), "height:", img:get_height());

img:resize(200, 200)
img:write("resized.png")

Images are automatically freed from memory by LuaJIT's garbage collector, but images can take up a lot of space in memory when loaded so it's recommended to call destroy on the image object as soon as possible.

Using GraphicsMagick

ImageMagick and GraphicsMagick implement (mostly) the same interface. By default the magick module will include ImageMagick. You can specify which library you use by calling require on the module for the appropriate library. At the moment it's impossible to include both libraries into the same process due to collision of function names in the C namespace.

Load ImageMagick directly:

magick = requrie "magick.wand"
local img = magick.load_image("some_image.png")

Load GraphicsMagick directly:

magick = requrie "magick.gmwand"
local img = magick.load_image("some_image.png")

Methods

Note: Not all the functionality of the respective image libraries is exposted on the Image interface. Pull requests welcome.

Methods mutate the current image when appropriate. Use clone to get an independent copy.

img:resize(w,h, f="Lanczos2", blur=1.0)

Resizes the image, f is resize function, see Filer Types

img:adaptive_resize(w,h)

Resizes the image using adaptive resize

img:crop(w,h, x=0, y=0)

Crops image to w,h where the top left is x, y

img:blur(sigma, radius=0)

Blurs the image with specified parameters. See Blur Arguments

img:rotate(degrees, r=0, g=0, b)

Rotates the image by specified number of degrees. The image dimensions will enlarge to prevent cropping. The triangles on the corners are filled with the color specified by r, g, b. The color components are specified as floating point numbers from 0 to 1.

img:sharpen(sigma, radius=0)

Sharpens the image with specified parameters. See Sharpening Images

img:resize_and_crop(w,h)

Resizes the image to w,h. The image will be cropped if necessary to maintain its aspect ratio.

img:get_blob()

Returns Lua string containing the binary data of the image. The blob is formatted the same as the image's current format (eg. PNG, Gif, etc.). Use image:set_format to change the format.

img:write(fname)

Writes the image to the specified filename

img:get_width()

Gets the width of the image

img:get_height()

Gets the height of the image

img:get_format()

Gets the current format of image as a file extension like "png" or "bmp". Use image:set_format to change the format.

img:set_format(format)

Sets the format of the image, takes a file extension like "png" or "bmp"

img:get_quality()

Gets the image compression quality.

img:set_quality(quality)

Sets the image compression quality.

img:get_gravity()

Gets the image gravity type.

img:set_gravity(gravity)

Sets the image's gravity type:

gravity can be one of the values listed in data.moon

img:get_option(magick, key)

Returns all the option names that match the specified pattern associated with a image (e.g img:get_option("webp", "lossless"))

img:set_option(magick, key, value)

Associates one or options with the img (e.g img:set_option("webp", "lossless", "0"))

img:scale(w, h)

Scale the size of an image to the given dimensions.

img:coalesce()

Coalesces the current image by compositing each frame on the previous frame. This un-optimized animated images to make them suitable for other methods.

img:composite(source, x, y, compose)

Composite another image onto another at the specified offset x, y.

compose can be one of the values listed in data.moon

img:strip()

Strips image of all profiles and comments, useful for removing exif and other data

r,g,b,a = img:get_pixel(x, y)

Get the r,g,b,a color components of a pixel in the image as doubles from 0 to 1

img:clone()

Returns a copy of the image.

img:modulate(brightness=100, saturation=100, hue=100)

Adjust the brightness, saturation, and hue of the image. See Modulate Brightness, Saturation, and Hue

img:thumb(size_str)

Mutates the image to be a thumbnail. Uses the same size string format described at the top of this README.

img:destroy()

Immediately frees the memory associated with the image, it is invalid to use the image after calling this method. It is unnecessary to call this method normally as images are tracked by the garbage collector.

Tests

Tests use Busted. Install and execute the following command to run tests. You can check the output in spec/output_images/.

$ busted

Changelog

1.6.0 - Tue Feb 2 01:18:06 PM PST 2021

  • Support ImageMagick 7
  • Fix memory leak with coalesce for ImageMagick
  • Add sharpen, set_quality, auto_orient, get_colorspace, set_colorspace, level_image, hald_clut for GraphicsMagick
  • Throw error if size string can not be parsed in thumb, handle case when source size is missing, more specs for thumb
  • Update test suite to GitHub actions, remove TravisCI
    • Test suite runs for LuaJIT beta and OpenResty's LuaJIT fork
    • Currently runs on Ubuntu: ImageMagick 6.9.10, GraphicsMagick 1.3.35, Arch Linux: ImageMagick 7.0.10.61, GraphicsMagick 1.3.36
    • Fix broken spec for modulate

1.5.0 - Tue Jun 20 13:33:41 PDT 2017

  • Add get_depth and set_depth to GraphicsMagick & ImageMagick

1.4.0 - Tue Jun 6 22:54:12 PDT 2017

  • Add reset_page to GraphicsMagick
  • Add get_format and set_format to GraphicsMagick

1.3.0 - Wed Mar 8 09:49:31 PST 2017

  • Add modulate (@granpc)
  • Add more methods to graphics magick: composite, clone, blur (@granpc)
  • Add reset page to imagemagick wand (@thierrylamarre)
  • Clone method is uses the clone function provided by image magick, garbage collects new image
  • Add thumb method on the image class

1.2.0 - Tue Jul 12 21:10:23 PDT 2016

  • Add preliminary GraphicsMagick support
  • Fix bug with gravity getter/setter (@ram-nadella)
  • Add additional wand method: #32 (@sergeyfedotov)

1.1.0 - Thu Oct 22 05:11:41 UTC 2015

  • add automatic memory management with ffi.gc
  • fix some string memory leaks when getting type and options of image
  • add coalesce, rotate methods to image
  • use pkg-config instead of MagickWand-config to query library
  • all include paths provided by config are searched instead of first

Contact

Author: Leaf Corcoran (leafo) (@moonscript)
Email: [email protected]
Homepage: http://leafo.net

magick's People

Contributors

flisky avatar leafo avatar monadbobo avatar neoascetic avatar ram-nadella avatar sergeyfedotov avatar thierrylamarre avatar yoshida-mediba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magick's Issues

Problem with 2 request

Hi leafo,
I have a problem with two consecutive requests, this is my code

local img = assert(magick.load_image(image.jpg))
img:crop(250,250,360,130)
img:resize_and_crop(150, 100)

with this code output is a image with 1x1 pixel,
however, if I do this:

local img = assert(magick.load_image(image.jpg))
img:crop(250,250,360,130)
img = assert(magick.load_image_from_blob(get_blob()))
img:resize_and_crop(150, 100)

It works as expected, why?

module 'magick' not found.

I have installed magick but when I try to access it, it gives me an error says magick not found.

2017/03/09 10:57:15 [error] 27432#0: *1 lua entry thread aborted: runtime error: ...tml/default/image-server-tutorial/magick-master/test.lua:1: module 'magick' not found:
no field package.preload['magick']
no file '/usr/local/openresty/site/lualib/magick.lua'
no file '/usr/local/openresty/site/lualib/magick/init.lua'
no file '/usr/local/openresty/lualib/magick.lua'
no file '/usr/local/openresty/lualib/magick/init.lua'
no file './magick.lua'
no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta2/magick.lua'
no file '/usr/local/share/lua/5.1/magick.lua'
no file '/usr/local/share/lua/5.1/magick/init.lua'
no file '/usr/local/openresty/luajit/share/lua/5.1/magick.lua'
no file '/usr/local/openresty/luajit/share/lua/5.1/magick/init.lua'
no file '/usr/local/openresty/site/lualib/magick.so'
no file '/usr/local/openresty/lualib/magick.so'
no file './magick.so'
no file '/usr/local/lib/lua/5.1/magick.so'
no file '/usr/local/openresty/luajit/lib/lua/5.1/magick.so'
no file '/usr/local/lib/lua/5.1/loadall.so'

above is my output. And when I checked "whereis magick", it gives me "magick: /usr/local/bin/magick".

can magic give google webp format support

hi leafo!

 Because WebP lossless images are 26% smaller in size compared to PNGs,so i want to use webp format in lua to scale my image, can you give me some help?

signal 17 (SIGCHLD) received

When i add line to code

local magick = require("magick")

nginx log say:

2016/06/29 14:10:38 [info] 5#0: waitpid() failed (10: No child processes)
2016/06/29 14:10:39 [notice] 5#0: signal 17 (SIGCHLD) received

It is normal?

set_pixel

image.get_pixel is very handy to read a pixel but there is no way to write a pixel! I'm trying to batch manipulate a bunch of images so I really need the ability to set pixels..

Use first frame from GIF instead last one

I have problem with GIF thumbnailing. Now 'magick' use static image as thumbnail for gif, ok. But it takes the last frame, and sometimes its broken.

There are 2 attached files. The first one is a screenshot of the original last frame and theresult. The second attach is original gif file.
git_thumb
064ff87673c5ae3dc26fbaacfb722d32

Trying to implement MagickGetImageHistogram.

I have been trying to implement MagickGetImageHistogram, so I have changed two files. below is my change.
image.lua

local len = ffi.new("size_t[?]", 5)
local t = handle_result(self, lib.MagickGetImageHistogram(self.wand, len))

lib.lua

ffi.cdef([[  typedef void MagickWand;
typedef void PixelWand;

typedef int MagickBooleanType;
typedef int ExceptionType;
typedef int ssize_t;
typedef int CompositeOperator;
typedef int GravityType;
typedef int OrientationType;
typedef int InterlaceType;
typedef char DistortMethod[];

void MagickWandGenesis();
MagickWand* NewMagickWand();

PixelWand **MagickGetImageHistogram(MagickWand *wand, size_t *number_colors);
]])

But when I called MagickGetImageHistogram function from image.lua, it always return bool true. I don't understand what I missed. In documentation it says

MagickGetImageHistogram() returns the image histogram as an array of PixelWand wands.

So how do I convert it to lua table?

How to implement a hidden pixel

Using lapis framework i need to send an image created on-the-fly

local magick = require("magick")
local ngx = ngx
return function(self)
    local str_img = "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC"
    local img = magick.load_image_from_blob(ngx.decode_base64(str_img))
    ngx.header["content-type"] = "image/png"
   // HERE, HOW TO SEND THE  IMAGE TO BROWSER ?
    img:destroy()
end

error in MagickCompositeImage params (in wand)?

currently

  MagickBooleanType MagickCompositeImage(MagickWand *wand,
    const MagickWand *source_wand,const CompositeOperator compose,
    const ssize_t x,const ssize_t y);

but by API docs must be

  MagickBooleanType MagickCompositeImage(MagickWand *wand,
    const MagickWand *source_wand,const CompositeOperator compose,
    const MagickBooleanType clip_to_self,
    const ssize_t x,const ssize_t y);

Add `magick.new` and `magick.new_image`

So I was attempting to create and edit png images on the fly with magick, but I found that neither the magick.new or the magick.new_image function existed.

Would you like me to take a crack at adding them in a PR? I am not familiar with moon or the busted system.

For anyone looking for a really poor performance workaround using os.execute and imagemagick's convert, you can use this:

__tmp = '/tmp/pico2png.temp.png'
function new_image(w,h)
  os.execute('convert -size '..w.."x"..h..' xc:white '..__tmp)
  local png,err = magick.load_image(__tmp)
  return png,err
end
__points = {}
__count = 0
function set_pixel(x,y,r,g,b)
  table.insert(__points,"fill rgb("..r..","..g..","..b..") point "..x..","..y.." ")
  if __count > 2^12 then
    __flush_pixels()
    __count = 0
  end
  __count = __count + 1
end
function __flush_pixels()
  os.execute("convert -draw '"..table.concat(__points).."' "..__tmp.." "..__tmp)
  __points = {}
end
-- run this before reading information about your image object.
function __post()
  __flush_pixels()
  return magick.load_image(__tmp)
end

Got 'magick.wand.lib' not found error.

After install
sudo apt-get install luajit
sudo apt-get install libmagickwand-dev
sudo apt-get install luarocks
luarocks install magick

here is error:
local _obj_0 = require("magick.wand.lib")

stack traceback:
[C]: in function 'require'
/usr/local/lib/lua/magick.lua:5: in main chunk
[C]: in function 'require'

I can't find magick.wand.lib in my system.
How to make it work?

Memory leak in function get_blob

In function get_blob:

  local blob = lib.MagickGetImageBlob(self.wand, len)

the blob is a detached one from the original image->blob, so it must be freed by hand or change the above line with:

  local blob = ffi.gc(lib.MagickGetImageBlob(self.wand, len), ffi.C.free)

img:composite(source, x, y, compose) no vertical displacement

`
local magick = require "magick"

local bg = magick.load_image("bg.png")
local compose = magick.load_image("h1.gif")
bg:composite(compose, 1000, 0, "XorCompositeOp")
compose:destroy()

bg:write("bg.png")
bg:destroy()
`
The image gets drawn but in the incorrect position, it should be (1000, 0) but the result is (0, 0)
with magick.gmwand the program works as intended

Memory leaks

There's a couple of memory leaks when using ffi.string, because ffi.string makes a copy, you should free original string using MagickRelinquishMemory.

img:auto_orient() is in magic.lua, but no a line in documentation

I spend 3 work days trying to realize auto rotate by EXIF info function for this library.
But it is in the library!!!

Please, note this in documentation!
You can use img:auto_orient() function to rotate images by EXIF info!

And check file /usr/local/share/lua/5.1/magick/wand/image.lua before you begin make some new functionality!

Trim Support

Hi,

can you integrate the trim function? i hacked it myself (copy of strip() function) but i'm not a lua programmer.

Thx

How to achieve a custom effect?

convert one.png two.png three.png -compose displace -composite cylinderCMD.png Hello @leafo I'm trying to convert this command into C and later on I want to use it in lua. For that I used below set of methods. Could you help me to do this? I wouldn't have to posted a C related question over here but my ultimate goal is to use it in lua so I did. And for detail information you can check this link.

MagickCompositeImage(wand, wand2, DisplaceCompositeOp,MagickFalse, 0, 0); MagickCompositeImage(wand, wand3, DisplaceCompositeOp,MagickFalse, 0, 0); MagickWriteImage(wand,"final.png");

Error loading magick.

When I try to load this module. It gives me below error.
loop or previous error loading module 'magick'

bit depth

is there a method that returns the bit depth? particularly since pixel values are returned as doubles from 0 to 1, getting the actual pixel value back as an integer requires this.

calling thumb function with images in webp format raises an error

Hi guys,

when calling the thumb function with an webp image an error is raised. Can anyone tell whats wrong ?

im running it inside a docker container:

Dockerfile:

`FROM openresty/openresty:bionic

RUN apt-get update && apt-get install -y libmagickwand-dev libgraphicsmagick1-dev
RUN /usr/local/openresty/luajit/bin/luarocks install magick`

root@a96b53ba6d5c:/# apt-cache policy libmagickwand-dev libgraphicsmagick1-dev
libmagickwand-dev:
Installed: 8:6.9.7.4+dfsg-16ubuntu6.11
Candidate: 8:6.9.7.4+dfsg-16ubuntu6.11
Version table:
*** 8:6.9.7.4+dfsg-16ubuntu6.11 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
100 /var/lib/dpkg/status
8:6.9.7.4+dfsg-16ubuntu6 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
libgraphicsmagick1-dev:
Installed: 1.3.28-2ubuntu0.1
Candidate: 1.3.28-2ubuntu0.1
Version table:
*** 1.3.28-2ubuntu0.1 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
100 /var/lib/dpkg/status
1.3.28-2 500
500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

Version:

openresty/1.19.9.1
built by gcc 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
OS: Linux 5.10.25-linuxkit

serve_image.lua:

`-- resize the image
local magick = require("magick")
magick.thumb(source_fname, size, dest_fname)

ngx.exec(ngx.var.request_uri)`

the error:

2021/11/11 10:45:48 [error] 12#12: *3 lua entry thread aborted: runtime error: /usr/local/openresty/luajit/share/lua/5.1/magick/thumb.lua:59: unable to open file /tmp/magick-126rH8Q2ow8ZUn': No such file or directory @ error/constitute.c/ReadImage/544
images_1 | stack traceback:
images_1 | coroutine 0:
images_1 | [C]: in function 'assert'
images_1 | /usr/local/openresty/luajit/share/lua/5.1/magick/thumb.lua:59: in function 'thumb'
images_1 | /serve_image.lua:61: in main chunk, client: 172.20.0.1, server: , request: "GET /YmNiMGI2NzBi/50x50/1656955fcd7fbcaf8ed861f4af9b25b6_36.webp HTTP/1.1", host: "images.dev:81"
`

Can anyone help?
Thanks in advance

Mak

Sometimes 'line 162 attempt to index a nil value'

This line sometimes (when testing a fair amount of load) gives an error attempting to index a nil value.
line 162
local lname = get_flags():match("-l(MagickWand[^%s]*)")

I've added the following to see what gave the issue:

if (get_flags() == nil) then return error("Failed to load MagickWand ") end

And indeed this error gets returned, indicating get_flags() is nil.

What could be the problem here?

When support Lua 5.3?

Lua current version is 5.3.4 ; do you have any plan to support Lua newest version?

Attempt to index a nil value error occured randomly

I randomly will get this error when doing a simple require of this magick library

lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/magick/init.lua:148: attempt to index a nil value

If I refresh the page, everything will be fine again.

I am able to run MagickWand-config from console.

Any idea why this would happen?

test2.lua:10: attempt to index local 'img2' (a nil value)

`local magick = require "magick"

local img = magick.load_image("white.ico")
local blob = img:get_blob()
local img2 = magick.load_image_from_blob(blob)
img2:write("test2.ico")`

error:

luajit: test2.lua:6: attempt to index local 'img2' (a nil value) stack traceback: test2.lua:6: in main chunk [C]: at 0x55d98ce58120

Works fine when I try it with a png format.
The icon is white and of size 1px and was created using GIMP.

Cannot get filter list?

Failed to load filter list, can't resize

maybe because of my imagemagick path? It's installed via homebrew

Build error: Failed installing magick/wand/data.lua

log

$ luarocks install --local https://raw.githubusercontent.com/leafo/magick/master/magick-dev-1.rockspec
Using https://raw.githubusercontent.com/leafo/magick/master/magick-dev-1.rockspec... switching to 'build' mode
Cloning into 'magick'...
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 24 (delta 1), reused 14 (delta 0), pack-reused 0
Receiving objects: 100% (24/24), 52.74 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1/1), done.
Checking connectivity... done.

Error: Build error: Failed installing magick/wand/data.lua in /home/vagrant/.luarocks/lib/luarocks/rocks-5.1/magick/dev-1/lua/magick/wand/data.lua

commenting out those lines in the rockspec solves it for me:

    -- ["magick.gmwand.lib"] = "magick/gmwand/lib.lua",
    -- ["magick.wand.data"] = "magick/wand/data.lua",

(but probably disables functionality)

Strip EXIF Info

Hi,

i am mostly converting camera images that have EXIF information set. Generating jpg thumbs with dimensions 100x75, the image size is ~36KB, but when i strip the EXIF data, the file size reduces to 8KB. (imagemagick's convert -strip option) How do i do that with the lua bindings?

Best

Improve way to search for filters

On my machine, resample.h file is in /usr/include/ImageMagic-6/magick directory:

root@281ff7a9897e:/home/openresty# find / -name 'resample.h'
/usr/include/ImageMagick-6/magick/resample.h

Here my output of command that get_flags function uses:

root@281ff7a9897e:/home/openresty# pkg-config --cflags --libs MagickWand
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/x86_64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/include/x86_64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -lMagickWand-6.Q16 -lMagickCore-6.Q16

As you can see, required directory is the second, while only first include path is used by get_filters method. So it need to be improved to search for all include path and not only the first.

Why last page whet convert pdf to png

I love the magick project! :)
Especialy after a found auto_orient option.

But, whet i resize PDF file to PNG i got the last page. Why?
I really need the first!

And if it possable , it would be grate to get option as
convert source.pdf[0] output.jpeg

img:composite doc vs code

Documentation:
img:composite(source, compose, x, y)

Code:
composite = function(self, blob, x, y, opstr)

Documentation should be:
img:composite(source,x,y,compose)

Publish to moonrocks

Hi leafo,

Any idea when the current changes may be published to MoonRocks? The current version out there seems to be quite old. I'm currently just copying this file from here to use the strip function on my images. If you need help testing to ensure a clean publish, I may be able to pitch on too.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.