Code Monkey home page Code Monkey logo

meh's Introduction

meh 0.3
John Hawthorn ([email protected])

---

Installation

To compile type
  make 

To install type
  make install


Installation prefix can be changed by the PREFIX variable
  make install PREFIX=/usr
default prefix is /usr/local

Configuration can be changed in config.mk

---
Copyright (c) 2008-2009  John Hawthorn

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

---

meh's People

Contributors

alexeykovac avatar guillerodriguez avatar jhawthorn avatar rtandy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meh's Issues

test suite crashes in nearestscale

The test suite crashes at scale.c:175 in nearestscale. The reason seems to be the way nearestscale is invoked:

        nearestscale(&img, 1280, 1024, 1280, to);

In nearestscale, width and bytesperline are the same which causes jdy to be negative -- or rather, since it's unsigned, positive and very large. At the end of the first outer loop it gets added to newBuf, causing a segfault on the next access to newBuf at line 175.

Release meh 0.4?

With all the API changes in Giflib, it's a pain to make meh 0.3 compile properly.

Do you think it's time to release meh 0.4?

Thanks!

Convert doesn't work correctly

I have a view DICOM files which imagemagick can show with display, meh fails to do so.
They have no file-ending, but file identifies them as

MR000000: DICOM medical imaging data

and identify identifies them as

MR000000 DCM 320x320 320x320+0+0 8-bit sRGB 280KB 0.000u 0:00.000

Didn't try it with other formats thought since I was too lazy to search for unsupported formats other than this

Cursor keybindings

Just tried out meh and I really dig its speed! Don't you think left and right cursor keybindings would make it more user-friendly?

make error on macOS 10.12.6

after cloning meh from git and typing 'make' rather than making it gives this error:

`% make

cc -O3 -DNDEBUG -MMD -MP -MT "src/bmp.d" -c -o src/bmp.o src/bmp.c

In file included from src/bmp.c:5:

src/meh.h:50:15: error: unknown type name 'fd_set'

int setup_fds(fd_set *fds);
^
src/meh.h:51:17: error: unknown type name 'fd_set'

int process_fds(fd_set *fds);
^
2 errors generated.`

Using kill on image doesn't end running meh process

Steps to reproduce:

  1. Open any file with meh imageFile
  2. Use kill on the opened image (in this case i3wm shortcut for killing the window).
    image
  3. Verify in separate terminal session that process still exists: pgrep meh

Pressing q on the active opened image closes process properly.
image

Strangely xprop doesn't register any unique details on opened images:
(attaching this because it might be the reason why kill command cannot end running process due to missing pid?)

_NET_WM_DESKTOP(CARDINAL) = 1
_NET_WM_STATE(ATOM) = 
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
WM_NORMAL_HINTS(WM_SIZE_HINTS):

Directory support

I've added directory support where you can
meh my-dir
and you can navigate with the arrow keys normally through all
images in that directory.
Do you want me to polish the code a bit and submit a patch request ?

Interactive Zooming

This image viewer is amazing: Extremely fast and very nice to use from the command line!

However, it doesn't seem to let one control the image zoom, except by resizing the containing window, as it seems to always scale the image to fit the window. For very large images (lmuch arger than the screen resolution), this is very inconvenient. For images of other sizes, it would still be nice to have.

Following the spirit of meh, the way to go is probably to keep this functionality out of meh itself and doing something like

meh * | xargs -I___ mogrify -scale -10% ___ 
# Note that this code doesn't work, it's just to show the idea: Hitting 
# enter should scale down the image.
# Note also that this, provided it worked like intended, would 
# permanently scale the actual image file, instead of just zooming 
# the display. This shouldn't be hard to work around, though.

However, this way we only get one-way zoom, and as there is just one STDOUT, I don't see an obvious way to trigger two (or more) different commands for zooming in and out. Maybe if meh hat an option to write to one of several (named) pipes, depending on keystroke? Not sure about that, but then I don't know much about pipes.

Another idea: Hitting a number key could output the image filename (like with enter) plus the respective number (after a whitespace). Then the command behind the pipe could decide on what to do depending on which number it received along with the filename.

Or maybe Ctrl plus any symbol key could act like that? Then this wouldn't be restricted to just the number keys (but to always holding the Ctrl key...).

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.