Skip to content

Commit

Permalink
Replace old sample images with nice shiny images
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt committed Mar 19, 2019
1 parent eb2cb4f commit 5959bf0
Show file tree
Hide file tree
Showing 16 changed files with 152 additions and 128 deletions.
218 changes: 110 additions & 108 deletions doc/image_help.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions doc/v0/Exiftool.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Tagging an image with GPS coordinates:

$ exiftool -gpslongitude=-0.1179891 -gpslatitude=51.5110045 -gpslongituderef=W -gpslatituderef=N coffee.jpg

Setting the make, model, aperture, ISO and focal length:

$ exiftool -make=Nikon -model=D7100 -fnumber=3 -aperturevalue=3 -iso=320 -focallength=60.0mm coffee.jpg
Binary file added images/samples/acrylic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/samples/cathedral.jpg
Binary file not shown.
Binary file added images/samples/cityscape.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/samples/coffee.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/samples/dorset.jpg
Binary file not shown.
Binary file added images/samples/mercedes.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/samples/mountains.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/samples/penguin.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/samples/thames.jpg
Binary file not shown.
8 changes: 8 additions & 0 deletions licences/sample-images.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Sample images

Acrylic photo by Paweł Czerwiński on Unsplash
Cityscape photo by Steven Wei on Unsplash
Coffee photo by Jonathan Pielmayer on Unsplash
Mercedes photo by Markus Spiske on Unsplash
Mountains photo by Engjell Gjepali on Unsplash
Penguin photo by Yomex Owo on Unsplash
11 changes: 6 additions & 5 deletions src/imageserver/templates/canvas_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ <h2>Full-screen pop-up viewer</h2>
Click on a thumbnail image to launch a full-screen viewer.
<p>
<img class="clickable border" src="{{ url_for('image', src=image_src, width=200, height=200) }}"
alt="Winchester cathedral"
title="Winchester cathedral
This image shows the western face of the cathedral, on a sunny day in 2010"/>
alt="Mercedes Benz 280SL"
title="Mercedes Benz 280SL
Photo by Markus Spiske on Unsplash"/>
&nbsp;
<img class="clickable border" src="{{ url_for('image', src=image_src, width=200, height=200, flip='v') }}"
alt="Winchester cathedral, vertically flipped"
title="Winchester cathedral, curiously upside down"/>
alt="Mercedes Benz 280SL, vertically flipped"
title="Mercedes Benz 280SL, vertically flipped
Photo by Markus Spiske on Unsplash"/>
</p>
{% endblock %}
11 changes: 7 additions & 4 deletions src/imageserver/templates/gallery_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@
{ src: '{{ image_srcs.0 }}' },
{ src: '{{ image_srcs.1 }}' },
{ src: '{{ image_srcs.2 }}' },
{ src: '{{ image_srcs.0 }}', flip: 'v' },
{ src: '{{ image_srcs.1 }}', flip: 'v' },
{ src: '{{ image_srcs.2 }}', flip: 'v' },
{ src: '{{ image_srcs.3 }}' },
{ src: '{{ image_srcs.4 }}' },
{ src: '{{ image_srcs.5 }}' },
{ src: '{{ image_srcs.0 }}', colorspace: 'gray' },
{ src: '{{ image_srcs.1 }}', colorspace: 'gray' },
{ src: '{{ image_srcs.2 }}', colorspace: 'gray' }
{ src: '{{ image_srcs.2 }}', colorspace: 'gray' },
{ src: '{{ image_srcs.3 }}', colorspace: 'gray' },
{ src: '{{ image_srcs.4 }}', colorspace: 'gray' },
{ src: '{{ image_srcs.5 }}', colorspace: 'gray' }
],
viewer: {
showcontrols: 'yes'
Expand Down
21 changes: 12 additions & 9 deletions src/imageserver/views_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def logout():
def image_help():
embed = request.args.get('embed', '')

help_image_attrs = ImageAttrs('samples/cathedral.jpg')
help_image_attrs = ImageAttrs('samples/coffee.jpg')
logo_image_attrs = ImageAttrs('samples/quru110.png')
logo_pad_image_attrs = ImageAttrs('samples/quru470.png')

Expand Down Expand Up @@ -164,8 +164,8 @@ def image_help():
'image_help.html',
embed=embed,
extra_subs={
'cathedral.jpg': help_image_attrs.filename(with_path=False),
'buildings': help_image_attrs.folder_path(),
'coffee.jpg': help_image_attrs.filename(with_path=False),
'products': help_image_attrs.folder_path(),
'quru.png': logo_image_attrs.filename(with_path=False),
'quru-padded.png': logo_pad_image_attrs.filename(with_path=False),
'logos': logo_image_attrs.folder_path(),
Expand Down Expand Up @@ -294,7 +294,7 @@ def upload_complete():
@app.route('/simpleview/')
@login_required
def simple_view_index():
demo_image_attrs = ImageAttrs('samples/cathedral.jpg')
demo_image_attrs = ImageAttrs('samples/coffee.jpg')
return render_template(
'simple_view.html',
image_src=demo_image_attrs.filename()
Expand All @@ -312,7 +312,7 @@ def simple_view_help():
@app.route('/canvasview/')
@login_required
def canvas_view_index():
demo_image_attrs = ImageAttrs('samples/cathedral.jpg')
demo_image_attrs = ImageAttrs('samples/mercedes.jpg')
return render_template(
'canvas_view.html',
image_src=demo_image_attrs.filename()
Expand All @@ -331,9 +331,12 @@ def canvas_view_help():
@login_required
def gallery_view_index():
demo_image_srcs = [
'samples/cathedral.jpg',
'samples/dorset.jpg',
'samples/thames.jpg'
'samples/coffee.jpg',
'samples/acrylic.jpg',
'samples/cityscape.jpg',
'samples/mercedes.jpg',
'samples/mountains.jpg',
'samples/penguin.jpg'
]
return render_template(
'gallery_view.html',
Expand All @@ -352,7 +355,7 @@ def gallery_view_help():
@app.route('/slideshow/')
@login_required
def slideshow_view_index():
demo_image_attrs = ImageAttrs('samples/cathedral.jpg')
demo_image_attrs = ImageAttrs('samples/coffee.jpg')
return render_template(
'slideshow_view.html',
image_src=demo_image_attrs.filename()
Expand Down
4 changes: 2 additions & 2 deletions src/tests/test_web_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ def test_markdown_subs_imaging_help(self):
# Image help - subs //images.example.com/
self.assertNotIn('//images.example.com/', page_text)
self.assertIn('//localhost/', page_text)
# Image help - subs buildings
self.assertNotIn('buildings', page_text)
# Image help - subs products
self.assertNotIn('products', page_text)
self.assertIn('samples', page_text)
# Image help - subs quru.png
self.assertNotIn('quru.png', page_text)
Expand Down

0 comments on commit 5959bf0

Please sign in to comment.