Skip to content

Instantly share code, notes, and snippets.

@pkrnjevic
Created March 9, 2013 18:31
Show Gist options
  • Save pkrnjevic/5125165 to your computer and use it in GitHub Desktop.
Save pkrnjevic/5125165 to your computer and use it in GitHub Desktop.
Snippet using libepeg (in Go).
C.epeg_decode_size_set(im.cim, C.int(width), C.int(height))
C.epeg_quality_set(im.cim, C.int(quality))
var scaledData *C.uchar
var scaledSize C.int
C.epeg_memory_output_set(im.cim, &scaledData, &scaledSize)
C.epeg_encode(im.cim)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment