You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error reading input image: ERROR_MISSING_DELEGATE: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/746 exit status 1
#330
Closed
nonesubham opened this issue
Dec 19, 2024
· 4 comments
I am trying to setup for Windows & followed each step as mentioned but still getting error :
Error reading input image: ERROR_MISSING_DELEGATE: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/746
exit status 1
here's go code
// Create a new MagickWand
mw := imagick.NewMagickWand()
// Read the input JPG image
err := mw.ReadImage("C:\\Users\\mysel\\OneDrive\\Desktop\\test\\input.jpeg")
if err != nil {
fmt.Println("Error reading input image:", err)
os.Exit(1)
}
// Set the output format to PNG
err = mw.SetImageFormat("png")
if err != nil {
fmt.Println("Error setting image format:", err)
os.Exit(1)
}
// Write the output PNG image
err = mw.WriteImage("output.png")
if err != nil {
fmt.Println("Error writing output image:", err)
os.Exit(1)
}
fmt.Println("Image converted successfully!")
}`
The text was updated successfully, but these errors were encountered:
nonesubham
changed the title
Getting Error gopkg.in/gographics/imagick.v3/imagick: exec: "pkg-config": executable file not found in %PATH%
Error reading input image: ERROR_MISSING_DELEGATE: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/746 exit status 1
Dec 19, 2024
Seems like your build of ImageMagick is missing the libjpeg delegate.
If you have some spare time, could you please provide detailed instructions for setting up ImageMagick for Go on Windows? I followed every step outlined in the README but am still encountering an error. Additionally, I have another question: After building my Go project, will ImageMagick still need to be installed on the machine where I want to run the project, or will it be included in the build?
@nonesubham im not a windows user but I set up the CI pipeline based on original instructions provided by another windows user. So the steps in the readme and the ones in the github CI pipeline are the best current knowledge I have.
Yes, you will need to have ImageMagick installed on the target machine if you use dynamic linking. The Go binary will need to find those dll libraries. If you figure out how to static link, then you would not need to have to provide the external ImageMagick.
I am trying to setup for Windows & followed each step as mentioned but still getting error :
Error reading input image: ERROR_MISSING_DELEGATE: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/746
exit status 1
here's go code
`package main
import (
"fmt"
"os"
"gopkg.in/gographics/imagick.v3/imagick"
)
func main() {
// Initialize imagick
imagick.Initialize()
defer imagick.Terminate()
}`
The text was updated successfully, but these errors were encountered: