-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SetResourceLimit function (fixes #107) #139
Conversation
Fix issue gographics#107
add 'RESOURCE_WIDTH', 'RESOURCE_HEIGHT' Resource Type From C API
Add ResourceType |
|
||
// Specify resource limit at package level. | ||
func SetResourceLimit(rtype ResourceType, limit uint64) bool { | ||
ok := C.MagickSetResourceLimit(C.ResourceType(rtype), C.MagickSizeType(limit)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to run gofmt on your source files before committing.
imagick/magick_version.go
Outdated
return false | ||
} else { | ||
return true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be simplified to
return C.int(ok) == 1
fixed |
Thanks for the contribution and addressing the notes! |
Move the SetResourceLimit function from the MagickWand type to the package level. This does the same as MR gographics#139 but for the ImageMagick 7.
Move the SetResourceLimit function from the MagickWand type to the package level. This does the same as MR #139 but for the ImageMagick 7.
Fix issue #107