Comments (20)
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.
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.
@Jack000 converting the file manually works without any issues :/
from expose.
For some reason, it's saving the photo as an empty directory, rather than a photo
from expose.
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.
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.
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.
Thanks.
Also worth noting that the %
is in a slightly different colour to JPEG
on my terminal.
from expose.
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.
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.
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.
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.
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.
Interesting, changing the command to:
identify -format "%m\n" ./2015/shoot/steve.jpeg
with the new line character, it removes the trailing %
from expose.
Found this as well: http://unix.stackexchange.com/questions/167582/why-zsh-ends-a-line-with-a-highlighted-percent-symbol
from expose.
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.
Yeah definitely
$ scriptdir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
$ echo $scriptdir
/Users/steve
from expose.
Also:
$ echo $0
-zsh
from expose.
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.
Bingo, problem solved.
Thanks!
from expose.
Related Issues (20)
- #main min-width of 830px causes horizontal scrolling HOT 2
- Sidebar links to sub directory instead of `subdirectory/index.html` HOT 2
- Can this be hosted with github pages? HOT 2
- Can hidden folders and files be ignored?
- Gallery Headers HOT 2
- feature request: download the whole album as zip HOT 1
- Reverse Numerical Sorting? HOT 1
- RSS Feed?
- IPTC and Exif data discarded HOT 1
- Unable to encode vp8 with sound
- Examples of where things go
- Expose site works locally, but not hosted on Amazon S3 HOT 1
- Example configs for Jack.ventures Jack.works
- Adding a background color to the text ? HOT 2
- Next Photo button
- Guide for use in Windows? HOT 2
- yaml makes text disappear in image HOT 1
- Missing required dependency rsync HOT 1
- Non-latin symbols in folder names does not supported
- Error on Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expose.