GithubHelp home page GithubHelp logo

koofr / epeg Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 4.0 5.04 MB

Insanely fast JPEG/JPG thumbnail scaling with the minimum fuss and CPU overhead. It makes use of libjpeg features of being able to load an image by only decoding the DCT coefficients needed to reconstruct an image of the size desired.

CMake 2.51% C 96.35% Dockerfile 1.14%

epeg's People

Contributors

bancek avatar edofic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

epeg's Issues

Preserving orientation information

Thanks for your work on this and https://github.com/koofr/goepeg! Incredibly fast solutions with a nice simple API.

I saw in #1 that this and the upstream diverged a bit, but one behavior that may be worth porting over is... mattes/epeg@126c514

If I compile https://github.com/mattes/epeg from source and run the binary against an image it preserves orientation, but https://github.com/koofr/epeg.git seems to miss out on that functionality.

I'm not sure how to build this fork's epeg as a standalone binary, but I can at least use the https://github.com/koofr/goepeg library with bindings to validate that it's not preserving rotation.

package main

import (
	"github.com/koofr/goepeg"
	"log"
	"os"
	"strconv"
)

func main() {
	args := os.Args[1:]

	dimension, err := strconv.Atoi(args[2])
	if err != nil {
		log.Fatal(err)
	}

	quality := 100
	if err := goepeg.Thumbnail(args[0], args[1], dimension, quality, goepeg.ScaleTypeFitMax); err != nil {
		log.Fatal(err)
	}
}

The upstream epeg preserves orientation data.

Screen Shot 2020-11-19 at 11 07 47 PM

But this fork loses that unfortunately.

Screen Shot 2020-11-19 at 11 08 00 PM

I'm happy to help if I can, but I imagine I don't know enough about the implementation or C in general to be of much assistance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.