Questions tagged [go-imagick]

Go binding to ImageMagick's MagickWand C API

Go Imagick is a Go bind to ImageMagick's MagickWand C API.

It was originally developed and tested with ImageMagick 6.8.5-4, however most official Unix or Linux distributions use older versions (6.7.7, 6.8.0, etc) so some features in Go Imagick's master branch are being commented out and will see the light when these ImageMagick distributions could easily be updated (from the devops PoV).

https://github.com/gographics/imagick

17 questions
42
votes
2 answers

convert string to uint in go lang

I am trying to convert the string to uint on 32-bit ubuntu using the following code. But it always convert it in uint64 despite explicitly passing 32 as the argument in the function. Below in the code mw is the object of the image magick library.…
Naresh
  • 5,073
  • 12
  • 67
  • 124
2
votes
1 answer

Vips + mozjpeg vs Imagick

I'm looking for a solution to get the best jpeg compression when down scaling an image. I'm comparing Vips + Mozjpeg and Imagick (convert). My original file (pic.jpg) is 6.5 MB. I run: vipsthumbnail pic.jpg --size=1920x1280 --delete -o…
hamochi
  • 47
  • 4
2
votes
1 answer

How to persuade Go to find C libraries

Can anyone tell me what I'm doing wrong when building a go program that uses the ImageMagick library that has been installed to a non-standard location. What I think I'm seeing is that the program builds, but a flag telling the program to look in…
Danack
  • 24,939
  • 16
  • 90
  • 122
2
votes
1 answer

Best way to remove borders / crop image

I am using a Go package (Go binding to ImageMagick's MagickWand C API) to ImageMagick where I'm removing borders from images (cropping). The way I am using the trim function can be found below. Now the problem is the fuzzy factor. For example, if I…
Rogier Lommers
  • 2,263
  • 3
  • 24
  • 38
1
vote
2 answers

How to create optimised and progressive Images (JPG, PNG) in Go lang

I am using the following code in Go to resize my images in JPEG and PNG format. So, how do I convert them to progressive and optimized using Imagick. I'm using ImageMagick 6.9.3-8 Q16 x86_64 on ubuntu 14.04 I am saying optimized reason being I used…
Naresh
  • 5,073
  • 12
  • 67
  • 124
1
vote
3 answers

lot of temp magick files created in temporary folder

I am using the imagick library to resizing and cropping the images in a http handler. Which doesn't write anything in /tmp folder. But as i can a lot of these files are being created in that folder and it's size is growing on a daily basis and…
Naresh
  • 5,073
  • 12
  • 67
  • 124
0
votes
0 answers

convert pdf to jpg using imagick in golang.but using memory is too much in lunix. how to solve it?

import "gopkg.in/gographics/imagick.v3/imagick" func LoadParsePdf(lessonName string, validPageNos []int, localFolder string, pdfName string, imgPrefix string, imgSuffix string) (int, error) { support.Debug("begin convert pdf %s to img ", …
wangyy
  • 9
  • 2
0
votes
0 answers

Why does the disk write time for pngs increases with a sustain load using imagemagick?

I have two different images of same file sizes(60kb), one is of JPEG format and the other is PNG format. When I read and write these images into the disk at 1 rps the results are: read TIME: 6.784399ms write TIME: 14.318515ms for PNG read TIME: …
Sainath
  • 45
  • 4
0
votes
1 answer

how to remove the transparency backgrounds of an image using ImageMagick?Which function should i use to remove the CSS transparency grid?

I am trying to build an image manipulation API using ImageMagick.I am not able to compress the PNG images to the required level. How do I imitate this https://blog.imgix.com/2016/03/11/auto-compress.html behavior for PNG's using ImageMagick!!
Sainath
  • 45
  • 4
0
votes
0 answers

How do i compress an image to the most using GOmagick without lossing much of an information

I wanted to compress an image as much as possible and also without lossing much of an information(clarity) after resizing or croping a original image using GOmagick. Currently I am using setimagequality(q). Can anyone suggest the best way?
Sainath
  • 45
  • 4
0
votes
0 answers

Which function should i use to remove(strip) colorspace of a image using Imagemagick magickwand

I actually wanted to remove the colorspace of the image. However, which colorspace type should I use in the transformimagecolorspace method COLORSPACE_UNDEFINED or any thing else?
Sainath
  • 45
  • 4
0
votes
1 answer

Which function should i use to convert an image to grayscale using GOIMAGICK in GO

I want to convert an image to grayscale using magickwand in GOIMAGICK, but which one should I use: BlurImage(radius, sigma float64) error or BrightnessContrastImage(brightness, contrast float64) error?
Sainath
  • 45
  • 4
0
votes
1 answer

How to import an unpopular package to Docker using the GOLang official image?

I've posted this question already as an issue on the imagick git repository, but it has a very small user-base, so I'm hoping to get some help from here. I've been trying for a few days now to import https://github.com/gographics/imagick to Docker…
Anarch
  • 11
  • 4
0
votes
1 answer

Memory leak in go lang http Handler

I have the following code of http handler which on subsequent request download the original image from Amazon S3 and convert it in the desired aspect ratio and save it back on s3. This code leaks memory and after sometime it crashes.I have handled…
Naresh
  • 5,073
  • 12
  • 67
  • 124
0
votes
2 answers

Golang Converting Image magick object to []byte

I am using the following code which fetch the object from Amazon s3 and after performing resizing and cropping. I want to store it on s3. But the problem is i am not able convert the mw (Image maigck object) to byte array. Which will be used for…
Naresh
  • 5,073
  • 12
  • 67
  • 124
1
2