SlideShare a Scribd company logo
1 of 41
Download to read offline
Rami Sayar - @ramisayar
Senior Technical Evangelist
Microsoft Canada
Sharing my experience attempting to perform art-direction and finally
attempting to automate art-direction… This talk will give you an overview of
the most popular tools.
• What are Art-Directed Responsive Images
• How to Create Art-Directed Responsive Images
• Using Smartcrop.js, Imgix and Other Tools
• Dealing with Web Backends
• Building Your Own System with Cognitive Services
• Automating with Webpack
• Working knowledge of HTML5, CSS3, Responsive Web Design
and JavaScript.
Note: Slides will be made available on SlideShare.net/RamiSayar.
Follow @ramisayar.
• “Responsive Web Design” is now just called “Web Design”
• Various techniques and polyfills were tried until <picture>, sizes and
srcset became standard.
• srcset allows us to specify a comma-separated list of image URLs.
• The x descriptor allows us to specify a device-pixel-ratio e.g. 2x
• The w descriptor allows us to specify an image for a width-constraint
• sizes allows us to describe how many pixels an image needs.
• Can be relative to the viewport e.g. described in ems or fixed e.g. in px.
• Can pair media queries to specify how many pixels for a specific width
• <picture> & <source> allows you to do art-direction and select
images-based on breakpoints and media queries.
• media is an attribute in <source> executed when true
<picture>
<source media="(min-width: 36em)" srcset="large.jpg 1024w,
medium.jpg 640w, small.jpg 320w" sizes="33.3vw" />
<source srcset="cropped-large.jpg 2x, cropped-small.jpg 1x" />
<img src="small.jpg“ />
</picture>
Source: Smashing Magazine
In a responsive design, we want
to target images to fit with the
device.
• On a large screen, we want to
show a large image with plenty
of details.
• On a small screen, we want to
shrink or crop an image to
make it more relevant, useful
and beautiful
Source: Use Cases Responsive
Images
• Full Control - Manually select the resize and crop or even an
entirely different image for various sizes or aspect ratios.
• Pros: Full Artistic Control. Best Visual Effect.
• Cons: Manual & Tedious.
• Best Guess – Use an algorithm to resize and crop or even an
entirely different image past certain sizes or aspect ratios.
• Pros: Fully automatable.
• Cons: Algorithms might miss.
And not just different image sizes…
1. Find edges using laplace
2. Find regions with a color like skin
3. Find regions high in saturation
4. Generate a set of candidate crops using a sliding window
5. Rank them using an importance function to focus the detail in
the center and avoid it in the edges.
6. Output the candidate crop with the highest rank
npm install -g smartcrop-cli
node ./smartcrop-cli.js --width 100 --height 100 photo.jpg square-thumbnail.jpg
Fairly complicated on Win10, tweet @ramisayar for instructions or help.
• Imgix can do both face-based cropping, entropy-cropping and
mixing the two.
• Many different options for resizing and cropping images:
• Scale
• Fit
• Limit
• Fill
• Pad
• Crop
• Thumb
• Imagga crop & scale <- area of interest cropping
• Aspect ratio based cropping
• Control gravity
Show Imagga Crop Mode
• Provides a web UI and allows
for manual art-direction
• responsive.io is a service that
optimizes and delivers
perfect images for every
screen.
• Can automatically do Art
Direction using Focal-point
cropping and Smart zoom.
• Smartcrop.js
• Sketchy algorithm at best
• Doesn’t figure out responsive image breakpoints
• Imgix
• Have to host images on S3?
• Not free
• Cloudinary
• Does everything but you sorta have to program an API to do responsive image
breakpoints + art-direction
• Sizzlepig
• No automation, all manual
• Responsive.io
• Amazing but need $$$ money.
Using existing tools.
• Image thumbnailing middleware for Connect.js/Express.js that
integrates with content-aware cropping provided by Smartcrop.js
• Dependencies: imagemagick (or graphicsmagick), Cairo.
var thumbs = require('connect-thumbs');
app.use(thumbs());
yourdomain.com/thumbs/medium/images/aHR0plci5qcGc.jpg
• github.com/inadarei/connect-thumbs
• Responsive Images is part of the WordPress Core as of 4.4.
• Art-Direction Not Really Possible without paying for a service
like Cloudinary.
• wordpress.org/plugins/cloudinary-image-management-and-
manipulation-in-the-cloud-cdn/
• Smartcrop-rails gem is the integration of smartcrop.js JavaScript
library for your Rails 4 application.
• Not many solutions out there 
To Automate Offline & To Be Cheapish
It’s also open sourced at
github.com/cloudinary/responsive_breakpoints_generator
Cognitive Services let you build apps with powerful Machine
Learning algorithms using just a few lines of code.
• Computer Vision API
Thumbnail API: Generate a high quality storage-efficient
thumbnail based on any input image. Apply smart cropping to
generate thumbnails that differ from the aspect ratio of your
original image, yet preserve the region of interest.
Didn’t have time to write the plugins for you but here are the steps.
Objective 1: Automate Art-Direction at Build Time
Objective 2: Make This Transparent.
Steps:
• Run require(“image”) through the Responsive Breakpoints
Generator.
• Smartcrop with Cognitive Services
• Output Images to Build Folder
• Replace tags with <picture> in HTML
Objective 1: Automate Art-Direction at Upload Time
Objective 2: Make This Transparent.
Steps:
• Write filter that runs generated images by WordPress Core
through Cognitive Services
• Replace generated images with art-directed versions
• Serve images
• Art-Directed Responsive Images Primer
• Using Smartcrop.js, Imgix, Cloudinary and Other Tools
• Dealing with Web Backends
• Node.js
• WordPress
• Ruby on Rails
• Building Your Own System with Cognitive Services
• Automating with Gulp – YOUR HOMEWORK!
tw: @ramisayar | gh: @sayar
• Automatically Art-Directed Responsive Images? Here You Go.
• Responsive Image Breakpoints Generator, A New Open Source Tool
• Responsive Images Done Right: A Guide To <picture> And srcset
• Picturefill
• Smartcrop.js
• Automatically art-directed responsive images
• Responsive Images: Use Cases and Documented Code Snippets to Get
You Started
• Retina revolution
• Automatic Point-of-Interest Cropping with imgix
• Automate Your Responsive Images With Mobify.js
• Addressing the Responsive Images Performance Problem: A Case Study
• Responsive Images Done Right: A Guide To <picture> And
srcset
• https://responsive.io/
©2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered trademarks and/or trademarks in the
U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft
must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related Content

What's hot

Introduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsIntroduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsStefano Celentano
 
React Native - Workshop
React Native - WorkshopReact Native - Workshop
React Native - WorkshopFellipe Chagas
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React EcosystemFITC
 
Skillwise - Advanced web application development
Skillwise - Advanced web application developmentSkillwise - Advanced web application development
Skillwise - Advanced web application developmentSkillwise Group
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsIvano Malavolta
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling RewriterJustin Edelson
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - IntroductionSenthil Kumar
 
DynamicRecord Presentation
DynamicRecord PresentationDynamicRecord Presentation
DynamicRecord Presentationlinoj
 
How You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionHow You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionBoldRadius Solutions
 
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIReact.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIMarcin Grzywaczewski
 
The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013Matt Raible
 
Mastering react with redux
Mastering react with reduxMastering react with redux
Mastering react with reduxGaurav Singh
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on RailsMark Menard
 
Comparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsComparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsJennifer Estrada
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesEamonn Boyle
 

What's hot (20)

Handlebars & Require JS
Handlebars  & Require JSHandlebars  & Require JS
Handlebars & Require JS
 
Introduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsIntroduction to Sightly and Sling Models
Introduction to Sightly and Sling Models
 
React + Redux for Web Developers
React + Redux for Web DevelopersReact + Redux for Web Developers
React + Redux for Web Developers
 
React Native - Workshop
React Native - WorkshopReact Native - Workshop
React Native - Workshop
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React Ecosystem
 
Skillwise - Advanced web application development
Skillwise - Advanced web application developmentSkillwise - Advanced web application development
Skillwise - Advanced web application development
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile apps
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling Rewriter
 
Ember.js: Jump Start
Ember.js: Jump Start Ember.js: Jump Start
Ember.js: Jump Start
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
DynamicRecord Presentation
DynamicRecord PresentationDynamicRecord Presentation
DynamicRecord Presentation
 
How You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionHow You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in Production
 
Angular js for Beginnners
Angular js for BeginnnersAngular js for Beginnners
Angular js for Beginnners
 
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIReact.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UI
 
The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013
 
Mastering react with redux
Mastering react with reduxMastering react with redux
Mastering react with redux
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on Rails
 
Ajax
AjaxAjax
Ajax
 
Comparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsComparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAs
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
 

Similar to FITC - Exploring Art-Directed Responsive Images

Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Frédéric Harper
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesVitaly Friedman
 
The high resolution web
The high resolution webThe high resolution web
The high resolution webPatric Lanhed
 
Responsive App Design with the Salesforce Lightning Design System
Responsive App Design with the Salesforce Lightning Design SystemResponsive App Design with the Salesforce Lightning Design System
Responsive App Design with the Salesforce Lightning Design SystemKeir Bowden
 
Getting Intimate with Images on Android with James Halpern
Getting Intimate with Images on Android with James HalpernGetting Intimate with Images on Android with James Halpern
Getting Intimate with Images on Android with James HalpernFITC
 
Motion design in FIori
Motion design in FIoriMotion design in FIori
Motion design in FIoriRoman Rommel
 
Automated perf optimization - jQuery Conference
Automated perf optimization - jQuery ConferenceAutomated perf optimization - jQuery Conference
Automated perf optimization - jQuery ConferenceMatthew Lancaster
 
Iasi code camp 12 october 2013 responsive images in the wild-vlad zelinschi
Iasi code camp 12 october 2013 responsive images in the wild-vlad zelinschiIasi code camp 12 october 2013 responsive images in the wild-vlad zelinschi
Iasi code camp 12 october 2013 responsive images in the wild-vlad zelinschiCodecamp Romania
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web DesignMike Wilcox
 
Responsive Web Design and Retina Display
Responsive Web Design and Retina DisplayResponsive Web Design and Retina Display
Responsive Web Design and Retina Displayjimbatamang
 
Jimba Tamang: Responsive and Retina Design
Jimba Tamang: Responsive and Retina DesignJimba Tamang: Responsive and Retina Design
Jimba Tamang: Responsive and Retina Designwpnepal
 
Adobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + FireworksAdobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + FireworksNathan Smith
 
How to make your Eclipse application HiDPI ready!
How to make your Eclipse application HiDPI ready!How to make your Eclipse application HiDPI ready!
How to make your Eclipse application HiDPI ready!Lakshmi Priya
 
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...Yandex
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Designsimonstarr
 
Responsive Web design Zambig
Responsive Web design ZambigResponsive Web design Zambig
Responsive Web design ZambigTribune Media
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013Marc D Anderson
 
Responsive Images FCIP July 2013
Responsive Images FCIP July 2013Responsive Images FCIP July 2013
Responsive Images FCIP July 2013RZasadzinski
 

Similar to FITC - Exploring Art-Directed Responsive Images (20)

Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
The high resolution web
The high resolution webThe high resolution web
The high resolution web
 
Responsive App Design with the Salesforce Lightning Design System
Responsive App Design with the Salesforce Lightning Design SystemResponsive App Design with the Salesforce Lightning Design System
Responsive App Design with the Salesforce Lightning Design System
 
Getting Intimate with Images on Android with James Halpern
Getting Intimate with Images on Android with James HalpernGetting Intimate with Images on Android with James Halpern
Getting Intimate with Images on Android with James Halpern
 
Motion design in FIori
Motion design in FIoriMotion design in FIori
Motion design in FIori
 
Automated perf optimization - jQuery Conference
Automated perf optimization - jQuery ConferenceAutomated perf optimization - jQuery Conference
Automated perf optimization - jQuery Conference
 
Iasi code camp 12 october 2013 responsive images in the wild-vlad zelinschi
Iasi code camp 12 october 2013 responsive images in the wild-vlad zelinschiIasi code camp 12 october 2013 responsive images in the wild-vlad zelinschi
Iasi code camp 12 october 2013 responsive images in the wild-vlad zelinschi
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Responsive Web Design and Retina Display
Responsive Web Design and Retina DisplayResponsive Web Design and Retina Display
Responsive Web Design and Retina Display
 
Jimba Tamang: Responsive and Retina Design
Jimba Tamang: Responsive and Retina DesignJimba Tamang: Responsive and Retina Design
Jimba Tamang: Responsive and Retina Design
 
Adobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + FireworksAdobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + Fireworks
 
How to make your Eclipse application HiDPI ready!
How to make your Eclipse application HiDPI ready!How to make your Eclipse application HiDPI ready!
How to make your Eclipse application HiDPI ready!
 
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
 
Design responsively
Design responsivelyDesign responsively
Design responsively
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive Web design Zambig
Responsive Web design ZambigResponsive Web design Zambig
Responsive Web design Zambig
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
 
Responsive Images FCIP July 2013
Responsive Images FCIP July 2013Responsive Images FCIP July 2013
Responsive Images FCIP July 2013
 
Vector Graphics in Xamarin
Vector Graphics in XamarinVector Graphics in Xamarin
Vector Graphics in Xamarin
 

More from Rami Sayar

Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS DebuggingRami Sayar
 
Creating Beautiful CSS3 Animations - FITC Amsterdam 2016
Creating Beautiful CSS3 Animations - FITC Amsterdam 2016Creating Beautiful CSS3 Animations - FITC Amsterdam 2016
Creating Beautiful CSS3 Animations - FITC Amsterdam 2016Rami Sayar
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressRami Sayar
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingRami Sayar
 
What's New in ES6 for Web Devs
What's New in ES6 for Web DevsWhat's New in ES6 for Web Devs
What's New in ES6 for Web DevsRami Sayar
 
Scalable Django Architecture
Scalable Django ArchitectureScalable Django Architecture
Scalable Django ArchitectureRami Sayar
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in DjangoRami Sayar
 
FITC - Bootstrap Unleashed
FITC - Bootstrap UnleashedFITC - Bootstrap Unleashed
FITC - Bootstrap UnleashedRami Sayar
 
FITC - Node.js 101
FITC - Node.js 101FITC - Node.js 101
FITC - Node.js 101Rami Sayar
 
FITC - Data Visualization in Practice
FITC - Data Visualization in PracticeFITC - Data Visualization in Practice
FITC - Data Visualization in PracticeRami Sayar
 

More from Rami Sayar (10)

Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 
Creating Beautiful CSS3 Animations - FITC Amsterdam 2016
Creating Beautiful CSS3 Animations - FITC Amsterdam 2016Creating Beautiful CSS3 Animations - FITC Amsterdam 2016
Creating Beautiful CSS3 Animations - FITC Amsterdam 2016
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript Debugging
 
What's New in ES6 for Web Devs
What's New in ES6 for Web DevsWhat's New in ES6 for Web Devs
What's New in ES6 for Web Devs
 
Scalable Django Architecture
Scalable Django ArchitectureScalable Django Architecture
Scalable Django Architecture
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in Django
 
FITC - Bootstrap Unleashed
FITC - Bootstrap UnleashedFITC - Bootstrap Unleashed
FITC - Bootstrap Unleashed
 
FITC - Node.js 101
FITC - Node.js 101FITC - Node.js 101
FITC - Node.js 101
 
FITC - Data Visualization in Practice
FITC - Data Visualization in PracticeFITC - Data Visualization in Practice
FITC - Data Visualization in Practice
 

Recently uploaded

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

FITC - Exploring Art-Directed Responsive Images

  • 1. Rami Sayar - @ramisayar Senior Technical Evangelist Microsoft Canada
  • 2.
  • 3. Sharing my experience attempting to perform art-direction and finally attempting to automate art-direction… This talk will give you an overview of the most popular tools.
  • 4. • What are Art-Directed Responsive Images • How to Create Art-Directed Responsive Images • Using Smartcrop.js, Imgix and Other Tools • Dealing with Web Backends • Building Your Own System with Cognitive Services • Automating with Webpack
  • 5. • Working knowledge of HTML5, CSS3, Responsive Web Design and JavaScript. Note: Slides will be made available on SlideShare.net/RamiSayar. Follow @ramisayar.
  • 6.
  • 7. • “Responsive Web Design” is now just called “Web Design” • Various techniques and polyfills were tried until <picture>, sizes and srcset became standard. • srcset allows us to specify a comma-separated list of image URLs. • The x descriptor allows us to specify a device-pixel-ratio e.g. 2x • The w descriptor allows us to specify an image for a width-constraint • sizes allows us to describe how many pixels an image needs. • Can be relative to the viewport e.g. described in ems or fixed e.g. in px. • Can pair media queries to specify how many pixels for a specific width
  • 8. • <picture> & <source> allows you to do art-direction and select images-based on breakpoints and media queries. • media is an attribute in <source> executed when true <picture> <source media="(min-width: 36em)" srcset="large.jpg 1024w, medium.jpg 640w, small.jpg 320w" sizes="33.3vw" /> <source srcset="cropped-large.jpg 2x, cropped-small.jpg 1x" /> <img src="small.jpg“ /> </picture> Source: Smashing Magazine
  • 9.
  • 10. In a responsive design, we want to target images to fit with the device. • On a large screen, we want to show a large image with plenty of details. • On a small screen, we want to shrink or crop an image to make it more relevant, useful and beautiful Source: Use Cases Responsive Images
  • 11. • Full Control - Manually select the resize and crop or even an entirely different image for various sizes or aspect ratios. • Pros: Full Artistic Control. Best Visual Effect. • Cons: Manual & Tedious. • Best Guess – Use an algorithm to resize and crop or even an entirely different image past certain sizes or aspect ratios. • Pros: Fully automatable. • Cons: Algorithms might miss.
  • 12.
  • 13. And not just different image sizes…
  • 14.
  • 15. 1. Find edges using laplace 2. Find regions with a color like skin 3. Find regions high in saturation 4. Generate a set of candidate crops using a sliding window 5. Rank them using an importance function to focus the detail in the center and avoid it in the edges. 6. Output the candidate crop with the highest rank
  • 16. npm install -g smartcrop-cli node ./smartcrop-cli.js --width 100 --height 100 photo.jpg square-thumbnail.jpg Fairly complicated on Win10, tweet @ramisayar for instructions or help.
  • 17.
  • 18. • Imgix can do both face-based cropping, entropy-cropping and mixing the two.
  • 19.
  • 20. • Many different options for resizing and cropping images: • Scale • Fit • Limit • Fill • Pad • Crop • Thumb • Imagga crop & scale <- area of interest cropping • Aspect ratio based cropping • Control gravity
  • 22. • Provides a web UI and allows for manual art-direction
  • 23. • responsive.io is a service that optimizes and delivers perfect images for every screen. • Can automatically do Art Direction using Focal-point cropping and Smart zoom.
  • 24. • Smartcrop.js • Sketchy algorithm at best • Doesn’t figure out responsive image breakpoints • Imgix • Have to host images on S3? • Not free • Cloudinary • Does everything but you sorta have to program an API to do responsive image breakpoints + art-direction • Sizzlepig • No automation, all manual • Responsive.io • Amazing but need $$$ money.
  • 26. • Image thumbnailing middleware for Connect.js/Express.js that integrates with content-aware cropping provided by Smartcrop.js • Dependencies: imagemagick (or graphicsmagick), Cairo. var thumbs = require('connect-thumbs'); app.use(thumbs()); yourdomain.com/thumbs/medium/images/aHR0plci5qcGc.jpg • github.com/inadarei/connect-thumbs
  • 27. • Responsive Images is part of the WordPress Core as of 4.4. • Art-Direction Not Really Possible without paying for a service like Cloudinary. • wordpress.org/plugins/cloudinary-image-management-and- manipulation-in-the-cloud-cdn/
  • 28. • Smartcrop-rails gem is the integration of smartcrop.js JavaScript library for your Rails 4 application. • Not many solutions out there 
  • 29. To Automate Offline & To Be Cheapish
  • 30. It’s also open sourced at github.com/cloudinary/responsive_breakpoints_generator
  • 31. Cognitive Services let you build apps with powerful Machine Learning algorithms using just a few lines of code. • Computer Vision API Thumbnail API: Generate a high quality storage-efficient thumbnail based on any input image. Apply smart cropping to generate thumbnails that differ from the aspect ratio of your original image, yet preserve the region of interest.
  • 32.
  • 33.
  • 34. Didn’t have time to write the plugins for you but here are the steps.
  • 35. Objective 1: Automate Art-Direction at Build Time Objective 2: Make This Transparent. Steps: • Run require(“image”) through the Responsive Breakpoints Generator. • Smartcrop with Cognitive Services • Output Images to Build Folder • Replace tags with <picture> in HTML
  • 36. Objective 1: Automate Art-Direction at Upload Time Objective 2: Make This Transparent. Steps: • Write filter that runs generated images by WordPress Core through Cognitive Services • Replace generated images with art-directed versions • Serve images
  • 37. • Art-Directed Responsive Images Primer • Using Smartcrop.js, Imgix, Cloudinary and Other Tools • Dealing with Web Backends • Node.js • WordPress • Ruby on Rails • Building Your Own System with Cognitive Services • Automating with Gulp – YOUR HOMEWORK!
  • 38. tw: @ramisayar | gh: @sayar
  • 39. • Automatically Art-Directed Responsive Images? Here You Go. • Responsive Image Breakpoints Generator, A New Open Source Tool • Responsive Images Done Right: A Guide To <picture> And srcset • Picturefill • Smartcrop.js • Automatically art-directed responsive images • Responsive Images: Use Cases and Documented Code Snippets to Get You Started • Retina revolution • Automatic Point-of-Interest Cropping with imgix • Automate Your Responsive Images With Mobify.js • Addressing the Responsive Images Performance Problem: A Case Study
  • 40. • Responsive Images Done Right: A Guide To <picture> And srcset • https://responsive.io/
  • 41. ©2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.