Coder Social home page Coder Social logo

jpeg quality choice about maim HOT 5 CLOSED

naelstrof avatar naelstrof commented on June 15, 2024
jpeg quality choice

from maim.

Comments (5)

naelstrof avatar naelstrof commented on June 15, 2024

Currently there is no way to set the jpg quality in maim, and digging through imlib2's source code reveals that jpg saves at 75 quality by default.

To set the quality myself I have to use a function not described in the Imlib2 documentation:

void                __imlib_AttachTag(ImlibImage * im, const char *key,
                                      int val, void *data,
                                      ImlibDataDestructorFunction destructor);

I'll do some testing to get it to work, but a work-around you can use now is just save a png and convert it to a jpg using ImageMagick/Gimp/etc using the settings you desire.
Sorry for the inconvenience, and thanks!

from maim.

Sergey82 avatar Sergey82 commented on June 15, 2024

thanks for the concerning. i choosed jpg because of the speed and that i
was unable to use pnm formated image from maim in convert utility, convert
did said that there was something wrong with the image if it was in pnm or
bmp formats. similiar problem was when i tried to open an image in gimp or
pinta. command used was looking like: maim -g 100x100+100+100 image.pnm.
jpeg worked fine with an exeption of default image quality setting ~ 75%

2016-01-01 3:09 GMT+06:00 Dalton Nell [email protected]:

Currently there is no way to set the jpg quality in maim, and digging
through imlib2's source code reveals that jpg save at a 75 quality by
default.

To set the quality myself I have to use a function not described in the
Imlib2 documentation:

void __imlib_AttachTag(ImlibImage * im, const char *key,
int val, void *data,
ImlibDataDestructorFunction destructor);

I'll do some testing to get it to work, but a work-around you can use now
is just save a png and convert it to a jpg using ImageMagick/Gimp/etc using
the settings you desire.
Sorry for the inconvenience, and thanks!


Reply to this email directly or view it on GitHub
#55 (comment).

from maim.

naelstrof avatar naelstrof commented on June 15, 2024

It should be maim -g 100x100+100+100 image.png I don't believe pnm is a format.

from maim.

Sergey82 avatar Sergey82 commented on June 15, 2024

yes pnm is a format. much like bmp, pnm is a bit map. and no the command i
typed was a command i wish to use, it was not a mistype. png is too slow,
0.5 sec to save. the delay is unsatifying. comparing to jpeg's 0.05 sec.
ten times less is fine ratio by me.
well no problem, the tool is free in any way. thanx for chatting.

2016-01-08 15:10 GMT+06:00 Dalton Nell [email protected]:

It should be maim -g 100x100+100+100 image.png I don't believe pnm is a
format.


Reply to this email directly or view it on GitHub
#55 (comment).

from maim.

naelstrof avatar naelstrof commented on June 15, 2024

Done: 626b9dd

from maim.

Related Issues (20)

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.