Giter Site home page Giter Site logo

Photos not saving about expose HOT 20 CLOSED

jack000 avatar jack000 commented on June 17, 2024
Photos not saving

from expose.

Comments (20)

qmaxquique avatar qmaxquique commented on June 17, 2024

Same problem here (with some additional error message)

root@terminal40748:~/Expose/photos# uname -a
Linux terminal40748 2.6.32-042stab104.1 #1 SMP Thu Jan 29 12:58:41 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux

root@terminal40748:~/Expose/photos# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"

root@terminal40748:~/Expose/photos# ../expose.sh
Scanning directories../expose.sh: line 218: /dev/fd/62: No such file or directory

Populating nav
Reading files
Building HTML
Starting encode
root@terminal40748:~/Expose/photos# tree .
.
|-- _site
|   |-- cookie.js
|   |-- global.css
|   |-- global.js
|   |-- img
|   |   |-- camera.png
|   |   |-- camera_mask.png
|   |   |-- close.png
|   |   |-- comment.png
|   |   |-- comment_mask.png
|   |   |-- download.png
|   |   |-- download_mask.png
|   |   |-- facebook.png
|   |   |-- facebook_mask.png
|   |   |-- hackernews.png
|   |   |-- hackernews_mask.png
|   |   |-- heart.png
|   |   |-- heart_mask.png
|   |   |-- monitor.png
|   |   |-- monitor_mask.png
|   |   |-- next.png
|   |   |-- pinterest.png
|   |   |-- pinterest_mask.png
|   |   |-- prev.png
|   |   |-- reddit.png
|   |   |-- reddit_mask.png
|   |   |-- text.png
|   |   |-- text_mask.png
|   |   |-- twitter.png
|   |   `-- twitter_mask.png
|   |-- index.html
|   `-- json.js
|-- cental_park\ -\ 1.jpg
|-- cental_park\ -\ 2.jpg
|-- cental_park\ -\ 3.jpg
|-- cental_park\ -\ 4.jpg
|-- cental_park\ -\ 5.jpg
|-- cental_park\ -\ 6.jpg
`-- cental_park\ -\ 7.jpg

2 directories, 37 files

from expose.

Jack000 avatar Jack000 commented on June 17, 2024

SteveEdson: I'm guessing it's either imagemagick or the file itself. The image wouldn't be generated if the convert command fails. Do you get anything if you run this?

 convert ./2015/shoot/steve.jpg -resize 100x100 -quality 92 +profile '*' ./test.jpg

qmaxquique: I think your problem is different, because it fails at the scanning directories stage. The script uses find to get a list of directories from your cwd. What do you get if you run this?

 find . -type d ! -path ".*/_*" | sort

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

@Jack000 converting the file manually works without any issues :/

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

For some reason, it's saving the photo as an empty directory, rather than a photo

from expose.

Jack000 avatar Jack000 commented on June 17, 2024

yeah that's what I'd expect. It creates a directory and saves each resolution in the directory.

my next guess is that it probably misidentified the image type. What do you get if you run this?

 identify -format "%m" ./2015/shoot/steve.jpg

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

Here is the output. The image is just my

$ identify -format "%m" ./2015/shoot/steve.jpg
JPEG%

The image is just my avatar.

Thanks

from expose.

Jack000 avatar Jack000 commented on June 17, 2024

is that % in the output? that'd be the problem, but I don't have any idea why it would do that... will investigate

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

Thanks.

Also worth noting that the % is in a slightly different colour to JPEG on my terminal.

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

Also, here is the output using exiftool:

ExifTool Version Number         : 10.01
File Name                       : steve.jpeg
Directory                       : 2015/shoot
File Size                       : 41 kB
File Modification Date/Time     : 2015:10:14 11:50:40+01:00
File Access Date/Time           : 2015:10:14 12:31:28+01:00
File Inode Change Date/Time     : 2015:10:14 11:50:52+01:00
File Permissions                : rw-r-----
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
Comment                         : CREATOR: gd-jpeg v1.0 (using IJG JPEG v80), quality = 90.
Image Width                     : 460
Image Height                    : 460
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 460x460
Megapixels                      : 0.212

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

It's nothing to do with the actual image format / encoding:

$ identify -format "%n" ./2015/shoot/steve.jpeg
1%

Where

%n number of images in current image sequence

All values seem to have a % at the end.

from expose.

Jack000 avatar Jack000 commented on June 17, 2024

weird, I guess output from the identify command isn't always reliable. This commit should address your issue, if the % was indeed the problem: bdb5a9c

from expose.

zeeZ avatar zeeZ commented on June 17, 2024

What's your ImageMagick/Identify version?
Which shell are you using?
That's super weird and not something I've come across in ImageMagick documentation.

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

I'm using oh-my-zsh (zsh)

Version: ImageMagick 6.9.2-4 Q16 x86_64 2015-10-11 http://www.imagemagick.org

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

Interesting, changing the command to:

identify -format "%m\n" ./2015/shoot/steve.jpeg

with the new line character, it removes the trailing %

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

Found this as well: http://unix.stackexchange.com/questions/167582/why-zsh-ends-a-line-with-a-highlighted-percent-symbol

from expose.

Jack000 avatar Jack000 commented on June 17, 2024

ah, zsh. That's probably the issue. I originally just wrote this for myself and there are some bash-specific things in there. It's pretty hard to make a script universally portable unfortunately, without resorting to perl or something.

Are you sure you're using zsh though? On zsh you'd get errors at the very beginning, from a reference to BASH_SOURCE

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

Yeah definitely

$ scriptdir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
$ echo $scriptdir
/Users/steve

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

Also:

$ echo $0
-zsh

from expose.

Jack000 avatar Jack000 commented on June 17, 2024

hehe, I think I've overlooked the extremely obvious. I assumed that the source images would be from a camera so it only downscales. Added a patch to upscale small images to the minimum resolution: b486b8d

from expose.

SteveEdson avatar SteveEdson commented on June 17, 2024

Bingo, problem solved.

Thanks!

from expose.

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.