Skip to content
Permalink
Browse files

Initial commit

  • Loading branch information...
DarthSim committed Jun 20, 2017
0 parents commit 0c006ce61e0fb27770ef0607b5aec16514365f36
Showing with 17,470 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +21 −0 LICENSE
  3. +22 −0 Makefile
  4. +12 −0 _vendor/src/github.com/h2non/bimg/.editorconfig
  5. +8 −0 _vendor/src/github.com/h2non/bimg/.gitignore
  6. +98 −0 _vendor/src/github.com/h2non/bimg/.travis.yml
  7. +85 −0 _vendor/src/github.com/h2non/bimg/History.md
  8. +24 −0 _vendor/src/github.com/h2non/bimg/LICENSE
  9. +347 −0 _vendor/src/github.com/h2non/bimg/README.md
  10. +15 −0 _vendor/src/github.com/h2non/bimg/file.go
  11. +38 −0 _vendor/src/github.com/h2non/bimg/file_test.go
  12. BIN _vendor/src/github.com/h2non/bimg/fixtures/corrupt.jpg
  13. BIN _vendor/src/github.com/h2non/bimg/fixtures/northern_cardinal_bird.jpg
  14. BIN _vendor/src/github.com/h2non/bimg/fixtures/test.gif
  15. BIN _vendor/src/github.com/h2non/bimg/fixtures/test.jp2
  16. BIN _vendor/src/github.com/h2non/bimg/fixtures/test.jpg
  17. BIN _vendor/src/github.com/h2non/bimg/fixtures/test.pdf
  18. BIN _vendor/src/github.com/h2non/bimg/fixtures/test.png
  19. +725 −0 _vendor/src/github.com/h2non/bimg/fixtures/test.svg
  20. BIN _vendor/src/github.com/h2non/bimg/fixtures/test.webp
  21. 0 _vendor/src/github.com/h2non/bimg/fixtures/test_gif.jpg
  22. BIN _vendor/src/github.com/h2non/bimg/fixtures/test_icc_prophoto.jpg
  23. BIN _vendor/src/github.com/h2non/bimg/fixtures/test_issue.jpg
  24. 0 _vendor/src/github.com/h2non/bimg/fixtures/test_pdf.jpg
  25. BIN _vendor/src/github.com/h2non/bimg/fixtures/test_square.jpg
  26. 0 _vendor/src/github.com/h2non/bimg/fixtures/test_svg.jpg
  27. BIN _vendor/src/github.com/h2non/bimg/fixtures/transparent.png
  28. BIN _vendor/src/github.com/h2non/bimg/fixtures/vertical.jpg
  29. +223 −0 _vendor/src/github.com/h2non/bimg/image.go
  30. +496 −0 _vendor/src/github.com/h2non/bimg/image_test.go
  31. +77 −0 _vendor/src/github.com/h2non/bimg/metadata.go
  32. +124 −0 _vendor/src/github.com/h2non/bimg/metadata_test.go
  33. +218 −0 _vendor/src/github.com/h2non/bimg/options.go
  34. +302 −0 _vendor/src/github.com/h2non/bimg/preinstall.sh
  35. +561 −0 _vendor/src/github.com/h2non/bimg/resize.go
  36. +644 −0 _vendor/src/github.com/h2non/bimg/resize_test.go
  37. +172 −0 _vendor/src/github.com/h2non/bimg/type.go
  38. +128 −0 _vendor/src/github.com/h2non/bimg/type_test.go
  39. +4 −0 _vendor/src/github.com/h2non/bimg/version.go
  40. +632 −0 _vendor/src/github.com/h2non/bimg/vips.go
  41. +532 −0 _vendor/src/github.com/h2non/bimg/vips.h
  42. +163 −0 _vendor/src/github.com/h2non/bimg/vips_test.go
  43. +21 −0 _vendor/src/github.com/tj/go-debug/History.md
  44. +8 −0 _vendor/src/github.com/tj/go-debug/Makefile
  45. +75 −0 _vendor/src/github.com/tj/go-debug/Readme.md
  46. +128 −0 _vendor/src/github.com/tj/go-debug/debug.go
  47. +152 −0 _vendor/src/github.com/tj/go-debug/debug_test.go
  48. +25 −0 _vendor/src/github.com/tj/go-debug/example/multiple.go
  49. +16 −0 _vendor/src/github.com/tj/go-debug/example/single.go
  50. +9 −0 _vendor/src/gopkg.in/yaml.v2/.travis.yml
  51. +13 −0 _vendor/src/gopkg.in/yaml.v2/LICENSE
  52. +31 −0 _vendor/src/gopkg.in/yaml.v2/LICENSE.libyaml
  53. +131 −0 _vendor/src/gopkg.in/yaml.v2/README.md
  54. +742 −0 _vendor/src/gopkg.in/yaml.v2/apic.go
  55. +682 −0 _vendor/src/gopkg.in/yaml.v2/decode.go
  56. +998 −0 _vendor/src/gopkg.in/yaml.v2/decode_test.go
  57. +1,684 −0 _vendor/src/gopkg.in/yaml.v2/emitterc.go
  58. +306 −0 _vendor/src/gopkg.in/yaml.v2/encode.go
  59. +501 −0 _vendor/src/gopkg.in/yaml.v2/encode_test.go
  60. +1,095 −0 _vendor/src/gopkg.in/yaml.v2/parserc.go
  61. +394 −0 _vendor/src/gopkg.in/yaml.v2/readerc.go
  62. +208 −0 _vendor/src/gopkg.in/yaml.v2/resolve.go
  63. +2,710 −0 _vendor/src/gopkg.in/yaml.v2/scannerc.go
  64. +104 −0 _vendor/src/gopkg.in/yaml.v2/sorter.go
  65. +12 −0 _vendor/src/gopkg.in/yaml.v2/suite_test.go
  66. +89 −0 _vendor/src/gopkg.in/yaml.v2/writerc.go
  67. +346 −0 _vendor/src/gopkg.in/yaml.v2/yaml.go
  68. +716 −0 _vendor/src/gopkg.in/yaml.v2/yamlh.go
  69. +173 −0 _vendor/src/gopkg.in/yaml.v2/yamlprivateh.go
  70. +93 −0 config.go
  71. +12 −0 config.yml.example
  72. +26 −0 crypt.go
  73. +59 −0 download.go
  74. +147 −0 main.go
  75. +91 −0 process.go
@@ -0,0 +1,2 @@
bin/
config.yml
21 LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Sergey Alexandrovich

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.
@@ -0,0 +1,22 @@
current_dir := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
vendor := $(current_dir)/_vendor
goenv := GOPATH="$(vendor):$(GOPATH)"

all: clean vendorize build

clean:
rm -rf bin/

vendorize:
cd $(current_dir)
GOPATH=$(vendor) go get -d
find $(vendor) -name ".git" -type d | xargs rm -rf

clean-vendor:
rm -rf $(vendor)

hard-vendorize: clean-vendor vendorize

build:
cd $(current_dir)
$(goenv) go build -v -ldflags '-w -s' -o bin/server
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = tabs
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
@@ -0,0 +1,8 @@
/bimg
/bundle
bin
/*.jpg
/*.png
/*.webp
/fixtures/*_out.*
/.idea/
@@ -0,0 +1,98 @@
language: go

dist: trusty
sudo: false

go:
- 1.6
- 1.7
- 1.8
- tip

env:
- LIBVIPS=7.42.3
- LIBVIPS=8.2.3
- LIBVIPS=8.3.3
- LIBVIPS=8.4.5
- LIBVIPS=8.5.5
- LIBVIPS=master

matrix:
allow_failures:
- env: LIBVIPS=7.42.3
- env: LIBVIPS=8.2.3
- env: LIBVIPS=8.3.3

cache:
apt:
directories:
- $HOME/libvips

addons:
apt:
packages:
- gobject-introspection
- gtk-doc-tools
- libcfitsio3-dev
- libfftw3-dev
- libgif-dev
- libgs-dev
- libgsf-1-dev
- libmatio-dev
- libopenslide-dev
- liborc-0.4-dev
- libpango1.0-dev
- libpoppler-glib-dev
- libwebp-dev

# VIPS 8.3.3 requires Poppler 0.30 which is not released on Trusty.
before_install:
- >
test "$LIBVIPS" != "master" -a "$LIBVIPS" \< "8.5" \
&& wget http://www.vips.ecs.soton.ac.uk/supported/${LIBVIPS%.*}/vips-${LIBVIPS}.tar.gz -O vips.tgz \
|| echo ":-)"
- >
test "$LIBVIPS" != "master" -a "$LIBVIPS" \> "8.5" \
&& wget https://github.com/jcupitt/libvips/releases/download/v${LIBVIPS}/vips-${LIBVIPS}.tar.gz -O vips.tgz \
|| echo ":-)"
- >
test $LIBVIPS == "master"\
&& wget https://github.com/jcupitt/libvips/archive/${LIBVIPS}.tar.gz -O vips.tgz \
|| echo ":-)"
- mkdir libvips
- tar xf vips.tgz -C libvips --strip-components 1
- cd libvips
- test -f autogen.sh && ./autogen.sh || ./bootstrap.sh
- >
CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0
./configure
--disable-debug
--disable-dependency-tracking
--disable-introspection
--disable-static
--enable-gtk-doc-html=no
--enable-gtk-doc=no
--enable-pyvips8=no
--without-orc
--without-python
--prefix=$HOME/libvips
$1
- make
- make install
- cd ..
- export PATH=$PATH:$HOME/libvips/bin
- export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/libvips/lib/pkgconfig
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/libvips/lib
- vips --vips-version

before_script:
- go get -u github.com/golang/lint/golint

script:
- diff -u <(echo -n) <(gofmt -s -d ./)
- diff -u <(echo -n) <(go vet ./)
- diff -u <(echo -n) <(golint ./)
- go test -v -race -covermode=atomic -coverprofile=coverage.out

after_success:
- goveralls -coverprofile=coverage.out -service=travis-ci
@@ -0,0 +1,85 @@

## v1.0.9 / 2017-05-25

* Merge pull request #156 from Dynom/SmartCropToGravity
* Adding a test, verifying both ways of enabling SmartCrop work
* Merge pull request #149 from waldophotos/master
* Replacing SmartCrop with a Gravity option
* refactor(docs): v8.4
* Change for older LIBVIPS versions. `vips_bandjoin_const1` is added in libvips 8.2.
* Second try, watermarking memory issue fix

## v1.0.8 / 2017-05-18

* Merge pull request #145 from greut/smartcrop
* Merge pull request #155 from greut/libvips8.5.5
* Update libvips to 8.5.5.
* Adding basic smartcrop support.
* Merge pull request #153 from abracadaber/master
* Added Linux Mint 17.3+ distro names
* feat(docs): add new maintainer notice (thanks to @kirillDanshin)
* Merge pull request #152 from greut/libvips85
* Download latest version of libvips from github.
* Merge pull request #147 from h2non/revert-143-master
* Revert "Fix for memory issue when watermarking images"
* Merge pull request #146 from greut/minor-major
* Merge pull request #143 from waldophotos/master
* Merge pull request #144 from greut/go18
* Fix tests where minor/major were mixed up
* Enabled go 1.8 builds.
* Fix the unref of images, when image isn't transparent
* Fix for memory issue when watermarking images
* feat(docs): add maintainers sections
* Merge pull request #132 from jaume-pinyol/WATERMARK_SUPPORT
* Add support for image watermarks
* Merge pull request #131 from greut/versions
* Running tests on more specific versions.
* refactor(preinstall.sh): remove deprecation notice
* Update preinstall.sh
* fix(requirements): required libvips 7.42
* fix(History): typo
* chore(History): add breaking change note

## v1.0.7 / 13-01-2017

- fix(#128): crop image calculation for missing width or height axis.
- feat: add TIFF save output format (**note**: this introduces a minor interface breaking change in `bimg.IsImageTypeSupportedByVips` auxiliary function).

## v1.0.6 / 12-11-2016

- feat(#118): handle 16-bit PNGs.
- feat(#119): adds JPEG2000 file for the type tests.
- feat(#121): test bimg against multiple libvips versions.

## v1.0.5 / 01-10-2016

- feat(#92): support Extend param with optional background.
- fix(#106): allow image area extraction without explicit x/y axis.
- feat(api): add Extend type with `libvips` enum alias.

## v1.0.4 / 29-09-2016

- fix(#111): safe check of magick image type support.

## v1.0.3 / 28-09-2016

- fix(#95): better image type inference and support check.
- fix(background): pass proper background RGB color for PNG image conversion.
- feat(types): validate supported image types by current `libvips` compilation.
- feat(types): consistent SVG image checking.
- feat(api): add public functions `VipsIsTypeSupported()`, `IsImageTypeSupportedByVips()` and `IsSVGImage()`.

## v1.0.2 / 27-09-2016

- feat(#95): support GIF, SVG and PDF formats.
- fix(#108): auto-width and height calculations now round instead of floor.

## v1.0.1 / 22-06-2016

- fix(#90): Do not not dereference the original image a second time.

## v1.0.0 / 21-04-2016

- refactor(api): breaking changes: normalize public members to follow Go naming idioms.
- feat(version): bump to major version. API contract won't be compromised in `v1`.
- feat(docs): add missing inline godoc documentation.
@@ -0,0 +1,24 @@
The MIT License

Copyright (c) Tomas Aparicio and contributors

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.

0 comments on commit 0c006ce

Please sign in to comment.
You can’t perform that action at this time.