You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 18, 2024. It is now read-only.
if it is false, then compare imageC with imageB (true/false)
Is that possible within this function?
if (jQuery('.portlet-queryRecordSearchResult').length) {
jQuery('.arena-record-cover a img').each(function(){
var thisImage = jQuery(this),
thisImageUrl = thisImage.attr('src'),
sameImage = false,
rembrandt = new Rembrandt({
imageA: '/documents/15189/0/portletResources01.jpg',
imageB: '/documents/15189/0/portletResources02.jpg',
imageC: thisImageUrl,
// Needs to be one of Rembrandt.THRESHOLD_PERCENT or Rembrandt.THRESHOLD_PIXELS
thresholdType: Rembrandt.THRESHOLD_PERCENT,
// The maximum threshold (0...1 for THRESHOLD_PERCENT, pixel count for THRESHOLD_PIXELS
maxThreshold: 0,
// Maximum color delta (0...255):
maxDelta: 20,
// Maximum surrounding pixel offset
maxOffset: 0
})
function isSameImage(sameImage) {
if (sameImage) {
thisImage.css('border', '2px solid red');
} else {
console.log('nope');
}
}
// Run the comparison
rembrandt.compare()
.then(function (result) {
isSameImage(result.passed)
})
});
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want to do this:
Is that possible within this function?
The text was updated successfully, but these errors were encountered: