Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Festina lente #3166

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class ImageOperations(playPath: String) extends GridLogging {
val thumbUnsharpRadius = 0.5d
val thumbUnsharpSigma = 0.5d
val thumbUnsharpAmount = 0.8d
val interlacedHow = "Line"

/**
* Given a source file containing a png (the 'browser viewable' file),
Expand Down Expand Up @@ -146,7 +147,8 @@ class ImageOperations(playPath: String) extends GridLogging {
val profiled = applyOutputProfile(stripped, optimised = true)
val unsharpened = unsharp(profiled)(thumbUnsharpRadius, thumbUnsharpSigma, thumbUnsharpAmount)
val qualified = quality(unsharpened)(qual)
val addOutput = {file:File => addDestImage(qualified)(file)}
val interlaced = interlace(qualified)(interlacedHow)
val addOutput = {file:File => addDestImage(interlaced)(file)}
for {
outputFile <- createTempFile(s"thumb-", thumbMimeType.fileExtension, tempDir)
_ <- runConvertCmd(addOutput(outputFile), useImageMagick = sourceMimeType.contains(Tiff))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ object ImageMagick extends GridLogging {
def scale(op: IMOperation)(dimensions: Dimensions): IMOperation = op <| (_.scale(dimensions.width, dimensions.height))
def format(op: IMOperation)(definition: String): IMOperation = op <| (_.format(definition))
def depth(op: IMOperation)(depth: Int): IMOperation = op <| (_.depth(depth))
def interlace(op: IMOperation)(interlacedHow: String): IMOperation = op <| (_.interlace(interlacedHow))

def runConvertCmd(op: IMOperation, useImageMagick: Boolean): Future[Unit] = {
logger.info(s"Using ${if(useImageMagick) { "imagemagick" } else { "graphicsmagick" }} for imaging operation $op")
Expand Down
68 changes: 0 additions & 68 deletions kahuna/public/js/directives/gr-image-fade-on-load.js

This file was deleted.

3 changes: 1 addition & 2 deletions kahuna/public/js/image/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@
ng-src="{{:: ctrl.optimisedImageUri}}"
grid:track-image="ctrl.image"
grid:track-image-location="original"
grid:track-image-loadtime
gr-image-fade-on-load/>
grid:track-image-loadtime/>
</div>

<!-- TODO: As this loads async, add a loader -->
Expand Down
3 changes: 0 additions & 3 deletions kahuna/public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import {editsApi} from './services/api/edits-api';
import {loaderApi} from './services/api/loader';
import {mediaApi} from './services/api/media-api';

import {imageFade} from './directives/gr-image-fade-on-load';

import {crop} from './crop/index';
import {image} from './image/index';
import {upload} from './upload/index';
Expand Down Expand Up @@ -83,7 +81,6 @@ var kahuna = angular.module('kahuna', [
globalErrors.name,

// directives used throughout
imageFade.name,
icon.name,
tooltip.name
]);
Expand Down
6 changes: 2 additions & 4 deletions kahuna/public/js/preview/image.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
<img class="preview__image"
ng-class="{'preview__image--staff': ctrl.states.isStaffPhotographer}"
alt="{{::ctrl.imageDescription}}"
ng-src="{{::ctrl.image.data.thumbnail | assetFile}}"
gr-image-fade-on-load />
ng-src="{{::ctrl.image.data.thumbnail | assetFile}}"/>
</a>

<span ng-if="ctrl.selectionMode" class="preview__no-link">
Expand All @@ -45,8 +44,7 @@
ng-class="{'preview__image--staff': ctrl.states.isStaffPhotographer}"
alt="{{::ctrl.image.data.metadata.description}}"
ng-src="{{::ctrl.image.data.thumbnail | assetFile}}"
ui-drag-data="ctrl.image | asImageDragData"
gr-image-fade-on-load />
ui-drag-data="ctrl.image | asImageDragData"/>
</span>

<div class="preview__info" ng-if="! ctrl.hideInfo">
Expand Down