Skip to content

lightweight image processing tool to convert images to grayscale

Notifications You must be signed in to change notification settings

menothe/grpc-image-processing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What it is

This is a lightweight image processing tool that converts a JPEG image to grayscale. It leverages gRPC for efficient processing.

[Example]

How to use

After cloning, run go run main.go at the root to boot the server, which is then ready for any client to submit image requests via gRPC calls. You can use a CLI tool like grpcurl to send the requests.

Sample json with a base64 encoded value (file's called "image_request.json" for example):

{
    "image_data": "O9vOmyyJvEbVFAKkEdgTtQIEgb"
}

Sample grpcurl call to the server: grpcurl -plaintext -d "`cat image_request.json`" localhost:8080 ImageProcessor/ConvertImage

The server will return a new base64 encoded value which you can copy to clipboard or save in a file (i.e. a .txt file) then decode the returned base64 using:

base64 --decode -i grayscale.txt -o grayscale.jpg

Opening grayscale.jpg should reveal a grayscale converted image of the original.

About

lightweight image processing tool to convert images to grayscale

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages