SlideShare a Scribd company logo
Mosaic Fun with
   OpenOffice Calc



  imacat (Yang Shih-Ching)
<imacat@mail.imacat.idv.tw>
          2012/11/6
“Mosaic Fun with OpenOffice Calc” is created by imacat (Yang Shih-Ching),
and licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
imacat / Yang Shih-Ching
●   From Taiwan local OpenOffice community
●   A graduate student from the Computer
    Science Education Laboratory, National
    Taiwan Normal University
●   A member of Women in FOSS in Taiwan
●   Was…
    –   A Sun/Oracle freelance lecturer
    –   An OpenOffice RD for 1 year
    –   A web application developer for 8 years
This session is all about multimedia and fun.
        So please relax and enjoy!
After all, I’m not a show business professional.
                 I’m a developer.
Please forgive me if this is not cool enough. :p
Since this is all about multimedia,
          before we start,
lets get some multimedia first! ^_*’
Lets Gangnam Style!
Feeling spirited now? ^_^
I will start by telling a story…
Long time ago in the far, far land
   when I was still a child…
Long time ago in the far, far land
         when I was still a child…
Well, actually it was only in this August. :p
I saw on my RSS reader...
So I followed the story and
  watched the video…
It’s cool, isn’t it?
It’s cool, isn’t it?
Yes, it’s SO COOL!
I forwarded it onto our Google Plus,
      our Facebook fans page,
     our forums, local forum, etc.
I forwarded it onto our Google Plus,
      our Facebook fans page,
     our forums, local forum, etc.
          Then I put it away
      and return to my textbook.
Until I saw Rob talking about this
        video the next day…
So I watched it again, and also the
      “behind the scenes”…
Well, I think…
Well, I think…
Yeah, I can do it…
Well, I think…
Yeah, I can do it…
programmatically!
Creating mosaic art involves
calculating the average colors of image blocks.
Since neither OpenOffice BASIC nor UNO API
                has any method
    to obtain the colors of individual pixels,
           I have use Java to do this.
So here it is… ^_^
(demonstration)
It’s cool, isn’t it?
No.
No, that’s not cool.
It’s uglier than the original “Stop-Motion Excel”.
     It’s not the “eye candy” that I imagined.
Why?
     The original “Stop-Motion Excel”
     was painted manually, cell by cell.
MysteryGuitarMan painted it with a fixed
     palette, but not “average colors”.
It looks sharp. It feels like an animation.
Comparing Hand-Painted Colors
  with Mosaic Average Colors
So I need to find something more cool,
           something sharp,
    something with a high contrast.
That is not an easy task.
The idea of Calc Mosaic
     is not only to create mosaic arts,
but also to create stop-motion animations.
But it takes averagely 20 seconds
to create a spreadsheet of mosaic art
    with the Java UNO application.
      I cannot run the animation
by creating the mosaic art at real-time.
So I turn to another method,
to create each frame with a spreadsheet,
       and play them in sequence,
       as a stop-motion animation.
But then a spreadsheet document can only
 contain a maximum of 256 spreadsheets.
Since I only have 256 frames,
     this cannot be long.
I remembered there is the iPod Ad
The iPod Ad…
●   Has only 31 seconds, corresponding to 8
    FPS if we are having 256 frames.
The iPod Ad…
●   Has only 31 seconds, corresponding to 8
    FPS if we are having 256 frames.
●   Has sharp images, high contrasts.
The iPod Ad…
●   Has only 31 seconds, corresponding to 8
    FPS if we are having 256 frames.
●   Has sharp images, high contrasts.
●   Is very famous.
So here it is…
(demonstration)
At the same time, Villeroy responded to my
Calc Mosaic on the forum, using a different
                approach.
Villeroy’s Response
So here it is…
(demonstration)
As you can see,
 Villeroy places the color values in the cells.
 The OpenOffice BASIC macro can read and
update the cell background colors accordingly.
       OpenOffice BASIC is a lot faster
                than Java UNO.
This makes it possible to animate at real time.
Villeroy’s approach still has some
         disadvantages…
Disadvantages of
            Villeroy’s Approach
●   You still need to have the color values first.
Disadvantages of
             Villeroy’s Approach
●   You still need to have the color values first.
●   The frame rate is still low.
Disadvantages of
             Villeroy’s Approach
●   You still need to have the color values first.
●   The frame rate is still low.
●   Villeroy updates the colors with styles.
    –   A lot faster than painting the background
        color cell by cell.
    –   The number of colors to use is limited.
        That is why it is gray-scaled.
This is a different approach than me.
    But I still got greatly inspired.
The color values can be saved in the sheets,
   and painted with OpenOffice BASIC.
        This can make it a lot faster.
And I know there is the setDataArray()
     in the interface XCellRangeData.
I can populate all the color values at once
    instead of hundreds of UNO calls
    to set the CellBackColor property
                Of SheetCell.
The New Process Will Be…
1.Calculates the average colors of mosaic
  cells with the Java application.
The New Process Will Be…
1.Calculates the average colors of mosaic
  cells with the Java application.
2.Passes the color values from Java to
  OpenOffice BASIC.
The New Process Will Be…
1.Calculates the average colors of mosaic
  cells with the Java application.
2.Passes the color values from Java to
  OpenOffice BASIC.
3.Paints the background colors of the
  spreadsheet cells with the OpenOffice
  BASIC macro.
So the problem becomes:
        Writing an application
both in Java and OpenOffice BASIC.
So the problem becomes:
         Writing an application
 both in Java and OpenOffice BASIC.
               Or, simply,
Creating the OpenOffice BASIC macros
   through the UNO API with Java.
In the unpublished UNO API,
    there is a BasicLibraries property
            in OfficeDocument
     that application developers can
access, insert or delete the BASIC macros.
There’s also the XScriptProvider interface
        that I can use it to invoke
    the existing OpenOffice macros.
So I use them to “inject” the BASIC macros
into the newly-created spreadsheet document,
             and run these macros.
In fact, I don’t even need to use setDataArray()
to paste the color values into the spreadsheets.
   I can pass the color values as parameters
           to the invoked BASIC macros.
This is troublesome,
     but the result is amazing.
It is 8 times faster then before!
When I prepare for this presentation,
 I became more and more greedy.
I want something new,
        something hot,
something gets people excited!
Then I came across this…
Something hot…
Well, again, I think…
Well, again, I think…
 Yeah, I can do it!
The Gangnam Style song is 4:12 long.
            That is 252 seconds.
 With 10 FPS, it needs 2520 spreadsheets.
    That is 10 spreadsheet documents.
(Each has a maximum of 256 spreadsheets.)
I can then concatenate the 10 recorded videos,
              join them into one,
     and create an OpenOffice Calc Style.
So here is it. Enjoy!
Get Calc Mosaic!
http://sf.net/p/calcmosaic
Thank you.
Any questions?

More Related Content

Viewers also liked

Anja Enggaard - Call Me og tal ordentligt
Anja Enggaard - Call Me og tal ordentligtAnja Enggaard - Call Me og tal ordentligt
Anja Enggaard - Call Me og tal ordentligt
Association of Danish Museums / Organisationen Danske Museer
 
Wm moorhead practical steps in business continuity planning, shared strategies
Wm moorhead   practical steps in business continuity planning, shared strategiesWm moorhead   practical steps in business continuity planning, shared strategies
Wm moorhead practical steps in business continuity planning, shared strategiesBrandon Williams
 
Programmeren in alice[1]
Programmeren in alice[1]Programmeren in alice[1]
Programmeren in alice[1]Gilles Horemans
 
Trea1 joseluis garcía_azabarte
Trea1 joseluis garcía_azabarteTrea1 joseluis garcía_azabarte
Trea1 joseluis garcía_azabartejoseluisguitar
 
Lead Management in SugarCRM Series: Viewing Leads
Lead Management in SugarCRM Series: Viewing LeadsLead Management in SugarCRM Series: Viewing Leads
Lead Management in SugarCRM Series: Viewing Leads
Atcore Systems
 
Linda Mol - Planning involving visitors
Linda Mol -  Planning involving visitorsLinda Mol -  Planning involving visitors
Linda Mol - Planning involving visitors
Association of Danish Museums / Organisationen Danske Museer
 
Esben Kjeldbæk, Lad genstanden tale. Erfaringer og overvejelser fra Nationalm...
Esben Kjeldbæk, Lad genstanden tale. Erfaringer og overvejelser fra Nationalm...Esben Kjeldbæk, Lad genstanden tale. Erfaringer og overvejelser fra Nationalm...
Esben Kjeldbæk, Lad genstanden tale. Erfaringer og overvejelser fra Nationalm...
Association of Danish Museums / Organisationen Danske Museer
 
Samir rafla principles of cardiology pages 62 86 --
Samir rafla principles of cardiology pages 62 86 --Samir rafla principles of cardiology pages 62 86 --
Samir rafla principles of cardiology pages 62 86 --
Alexandria University, Egypt
 
OpenOffice, Open Business
OpenOffice, Open BusinessOpenOffice, Open Business
OpenOffice, Open Business
imacat .
 

Viewers also liked (20)

Anja Enggaard - Call Me og tal ordentligt
Anja Enggaard - Call Me og tal ordentligtAnja Enggaard - Call Me og tal ordentligt
Anja Enggaard - Call Me og tal ordentligt
 
mads holst og mette svart kristiansen
mads holst og mette svart kristiansenmads holst og mette svart kristiansen
mads holst og mette svart kristiansen
 
Marianne Rasmussen
Marianne RasmussenMarianne Rasmussen
Marianne Rasmussen
 
Wm moorhead practical steps in business continuity planning, shared strategies
Wm moorhead   practical steps in business continuity planning, shared strategiesWm moorhead   practical steps in business continuity planning, shared strategies
Wm moorhead practical steps in business continuity planning, shared strategies
 
Programmeren in alice[1]
Programmeren in alice[1]Programmeren in alice[1]
Programmeren in alice[1]
 
Bodil Holstein - foto i stedet for intarsia
Bodil Holstein -  foto i stedet for intarsiaBodil Holstein -  foto i stedet for intarsia
Bodil Holstein - foto i stedet for intarsia
 
Henrik Sell - tilbage til istiden
Henrik Sell -  tilbage til istidenHenrik Sell -  tilbage til istiden
Henrik Sell - tilbage til istiden
 
Henriette Rensbo, Nationalmuseet, Årets kirkearkæologiske undersøgelser 2012
Henriette Rensbo, Nationalmuseet, Årets kirkearkæologiske undersøgelser 2012Henriette Rensbo, Nationalmuseet, Årets kirkearkæologiske undersøgelser 2012
Henriette Rensbo, Nationalmuseet, Årets kirkearkæologiske undersøgelser 2012
 
Trea1 joseluis garcía_azabarte
Trea1 joseluis garcía_azabarteTrea1 joseluis garcía_azabarte
Trea1 joseluis garcía_azabarte
 
2 recovery guidelines
2 recovery guidelines2 recovery guidelines
2 recovery guidelines
 
Lise Harvig
Lise HarvigLise Harvig
Lise Harvig
 
Lead Management in SugarCRM Series: Viewing Leads
Lead Management in SugarCRM Series: Viewing LeadsLead Management in SugarCRM Series: Viewing Leads
Lead Management in SugarCRM Series: Viewing Leads
 
Palle Eriksen hulbælter
Palle Eriksen hulbælterPalle Eriksen hulbælter
Palle Eriksen hulbælter
 
linda boye
linda boyelinda boye
linda boye
 
Linda Mol - Planning involving visitors
Linda Mol -  Planning involving visitorsLinda Mol -  Planning involving visitors
Linda Mol - Planning involving visitors
 
Esben Kjeldbæk, Lad genstanden tale. Erfaringer og overvejelser fra Nationalm...
Esben Kjeldbæk, Lad genstanden tale. Erfaringer og overvejelser fra Nationalm...Esben Kjeldbæk, Lad genstanden tale. Erfaringer og overvejelser fra Nationalm...
Esben Kjeldbæk, Lad genstanden tale. Erfaringer og overvejelser fra Nationalm...
 
Lennart S. Madsen, De fem søjler og arkæologien version 3
Lennart S. Madsen, De fem søjler og arkæologien version 3Lennart S. Madsen, De fem søjler og arkæologien version 3
Lennart S. Madsen, De fem søjler og arkæologien version 3
 
Svend Illum Hansen
Svend Illum HansenSvend Illum Hansen
Svend Illum Hansen
 
Samir rafla principles of cardiology pages 62 86 --
Samir rafla principles of cardiology pages 62 86 --Samir rafla principles of cardiology pages 62 86 --
Samir rafla principles of cardiology pages 62 86 --
 
OpenOffice, Open Business
OpenOffice, Open BusinessOpenOffice, Open Business
OpenOffice, Open Business
 

Similar to Mosaic Fun with OpenOffice Calc

Javascript Animation with Canvas - Gregory Starr 2015
Javascript Animation with Canvas - Gregory Starr 2015Javascript Animation with Canvas - Gregory Starr 2015
Javascript Animation with Canvas - Gregory Starr 2015
Gregory Starr
 
Smalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhoneSmalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhone
Esteban Lorenzano
 
Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014
Paris Android User Group
 
WRA 210 April 14th PowerPoint
WRA 210 April 14th PowerPointWRA 210 April 14th PowerPoint
WRA 210 April 14th PowerPointMiami University
 
Frost
FrostFrost
Transcript - Data Visualisation - Tools and Techniques
Transcript - Data Visualisation - Tools and TechniquesTranscript - Data Visualisation - Tools and Techniques
Transcript - Data Visualisation - Tools and Techniques
ARDC
 
Adobe Illustrator - Creating the Poster
Adobe Illustrator - Creating the PosterAdobe Illustrator - Creating the Poster
Adobe Illustrator - Creating the Poster
Timothy F McKenna
 
What does OOP stand for?
What does OOP stand for?What does OOP stand for?
What does OOP stand for?
Colin Riley
 
Coding - Pixel Art
Coding - Pixel ArtCoding - Pixel Art
Coding - Pixel Art
isarevi
 
Visual Rhetoric, Feb 18, 2013
Visual Rhetoric, Feb 18, 2013Visual Rhetoric, Feb 18, 2013
Visual Rhetoric, Feb 18, 2013
Miami University
 
Monday Night, Feb 10th Visrhet
Monday Night, Feb 10th VisrhetMonday Night, Feb 10th Visrhet
Monday Night, Feb 10th VisrhetMiami University
 
Problem solving
Problem solvingProblem solving
Problem solving
OliverKeppie
 
16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx
ssuser90e017
 
Umbra Ignite 2015: Alex Evans – Learning from failure – prototypes, R&D, iter...
Umbra Ignite 2015: Alex Evans – Learning from failure – prototypes, R&D, iter...Umbra Ignite 2015: Alex Evans – Learning from failure – prototypes, R&D, iter...
Umbra Ignite 2015: Alex Evans – Learning from failure – prototypes, R&D, iter...
Umbra Software
 
20140830 maker fairetrondheim
20140830 maker fairetrondheim20140830 maker fairetrondheim
3. fmp production experiments (finished)
3. fmp production experiments (finished)3. fmp production experiments (finished)
3. fmp production experiments (finished)
sean cawood
 
"Prototype Everything" at The conference(19/Aug/2014,Malmo,Sweden) by @tks
"Prototype Everything"  at The conference(19/Aug/2014,Malmo,Sweden)  by @tks"Prototype Everything"  at The conference(19/Aug/2014,Malmo,Sweden)  by @tks
"Prototype Everything" at The conference(19/Aug/2014,Malmo,Sweden) by @tks
Nico-Tech Shenzhen/ニコ技深圳コミュニティ
 
Tensorflow go
Tensorflow goTensorflow go
Tensorflow go
Patrick Walker
 
Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1
Scilab
 

Similar to Mosaic Fun with OpenOffice Calc (20)

Javascript Animation with Canvas - Gregory Starr 2015
Javascript Animation with Canvas - Gregory Starr 2015Javascript Animation with Canvas - Gregory Starr 2015
Javascript Animation with Canvas - Gregory Starr 2015
 
Smalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhoneSmalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhone
 
Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014
 
WRA 210 April 14th PowerPoint
WRA 210 April 14th PowerPointWRA 210 April 14th PowerPoint
WRA 210 April 14th PowerPoint
 
Frost
FrostFrost
Frost
 
Transcript - Data Visualisation - Tools and Techniques
Transcript - Data Visualisation - Tools and TechniquesTranscript - Data Visualisation - Tools and Techniques
Transcript - Data Visualisation - Tools and Techniques
 
Adobe Illustrator - Creating the Poster
Adobe Illustrator - Creating the PosterAdobe Illustrator - Creating the Poster
Adobe Illustrator - Creating the Poster
 
What does OOP stand for?
What does OOP stand for?What does OOP stand for?
What does OOP stand for?
 
Coding - Pixel Art
Coding - Pixel ArtCoding - Pixel Art
Coding - Pixel Art
 
Visual Rhetoric, Feb 18, 2013
Visual Rhetoric, Feb 18, 2013Visual Rhetoric, Feb 18, 2013
Visual Rhetoric, Feb 18, 2013
 
Monday Night, Feb 10th Visrhet
Monday Night, Feb 10th VisrhetMonday Night, Feb 10th Visrhet
Monday Night, Feb 10th Visrhet
 
Problem solving
Problem solvingProblem solving
Problem solving
 
16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx
 
Umbra Ignite 2015: Alex Evans – Learning from failure – prototypes, R&D, iter...
Umbra Ignite 2015: Alex Evans – Learning from failure – prototypes, R&D, iter...Umbra Ignite 2015: Alex Evans – Learning from failure – prototypes, R&D, iter...
Umbra Ignite 2015: Alex Evans – Learning from failure – prototypes, R&D, iter...
 
20140830 maker fairetrondheim
20140830 maker fairetrondheim20140830 maker fairetrondheim
20140830 maker fairetrondheim
 
3. fmp production experiments (finished)
3. fmp production experiments (finished)3. fmp production experiments (finished)
3. fmp production experiments (finished)
 
January 29th PowerPoint
January 29th PowerPointJanuary 29th PowerPoint
January 29th PowerPoint
 
"Prototype Everything" at The conference(19/Aug/2014,Malmo,Sweden) by @tks
"Prototype Everything"  at The conference(19/Aug/2014,Malmo,Sweden)  by @tks"Prototype Everything"  at The conference(19/Aug/2014,Malmo,Sweden)  by @tks
"Prototype Everything" at The conference(19/Aug/2014,Malmo,Sweden) by @tks
 
Tensorflow go
Tensorflow goTensorflow go
Tensorflow go
 
Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1
 

More from imacat .

A Room of WikiWomen's Own
A Room of WikiWomen's OwnA Room of WikiWomen's Own
A Room of WikiWomen's Own
imacat .
 
Office寶可夢GO IV計算機
Office寶可夢GO IV計算機Office寶可夢GO IV計算機
Office寶可夢GO IV計算機
imacat .
 
Crossing Office Applications
Crossing Office ApplicationsCrossing Office Applications
Crossing Office Applications
imacat .
 
OpenOffice Application with Python
OpenOffice Application with PythonOpenOffice Application with Python
OpenOffice Application with Python
imacat .
 
從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docs從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docs
imacat .
 
More Girls – Creating a Community of Diversity
More Girls – Creating a Community of DiversityMore Girls – Creating a Community of Diversity
More Girls – Creating a Community of Diversity
imacat .
 
Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4
imacat .
 
Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012
imacat .
 
GNU Autoconf / Automake #4
GNU Autoconf / Automake #4GNU Autoconf / Automake #4
GNU Autoconf / Automake #4
imacat .
 
GNU Autoconf / Automake #1
GNU Autoconf / Automake #1GNU Autoconf / Automake #1
GNU Autoconf / Automake #1
imacat .
 
Solitaire with Greenfoot #3
Solitaire with Greenfoot #3Solitaire with Greenfoot #3
Solitaire with Greenfoot #3
imacat .
 
Solitaire with Greenfoot #1
Solitaire with Greenfoot #1Solitaire with Greenfoot #1
Solitaire with Greenfoot #1
imacat .
 
Solitaire with Greenfoot #4
Solitaire with Greenfoot #4Solitaire with Greenfoot #4
Solitaire with Greenfoot #4
imacat .
 
Solitaire with Greenfoot #2
Solitaire with Greenfoot #2Solitaire with Greenfoot #2
Solitaire with Greenfoot #2
imacat .
 
Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4
imacat .
 
Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02
imacat .
 
Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01
imacat .
 
Welcome to Apache OpenOffice 3.4
Welcome to Apache OpenOffice 3.4Welcome to Apache OpenOffice 3.4
Welcome to Apache OpenOffice 3.4imacat .
 
OpenOffice UNO Application on Android
OpenOffice UNO Application on AndroidOpenOffice UNO Application on Android
OpenOffice UNO Application on Android
imacat .
 
OpenOffice.org Magic Sandbox
OpenOffice.org Magic SandboxOpenOffice.org Magic Sandbox
OpenOffice.org Magic Sandbox
imacat .
 

More from imacat . (20)

A Room of WikiWomen's Own
A Room of WikiWomen's OwnA Room of WikiWomen's Own
A Room of WikiWomen's Own
 
Office寶可夢GO IV計算機
Office寶可夢GO IV計算機Office寶可夢GO IV計算機
Office寶可夢GO IV計算機
 
Crossing Office Applications
Crossing Office ApplicationsCrossing Office Applications
Crossing Office Applications
 
OpenOffice Application with Python
OpenOffice Application with PythonOpenOffice Application with Python
OpenOffice Application with Python
 
從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docs從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docs
 
More Girls – Creating a Community of Diversity
More Girls – Creating a Community of DiversityMore Girls – Creating a Community of Diversity
More Girls – Creating a Community of Diversity
 
Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4
 
Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012
 
GNU Autoconf / Automake #4
GNU Autoconf / Automake #4GNU Autoconf / Automake #4
GNU Autoconf / Automake #4
 
GNU Autoconf / Automake #1
GNU Autoconf / Automake #1GNU Autoconf / Automake #1
GNU Autoconf / Automake #1
 
Solitaire with Greenfoot #3
Solitaire with Greenfoot #3Solitaire with Greenfoot #3
Solitaire with Greenfoot #3
 
Solitaire with Greenfoot #1
Solitaire with Greenfoot #1Solitaire with Greenfoot #1
Solitaire with Greenfoot #1
 
Solitaire with Greenfoot #4
Solitaire with Greenfoot #4Solitaire with Greenfoot #4
Solitaire with Greenfoot #4
 
Solitaire with Greenfoot #2
Solitaire with Greenfoot #2Solitaire with Greenfoot #2
Solitaire with Greenfoot #2
 
Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4
 
Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02
 
Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01
 
Welcome to Apache OpenOffice 3.4
Welcome to Apache OpenOffice 3.4Welcome to Apache OpenOffice 3.4
Welcome to Apache OpenOffice 3.4
 
OpenOffice UNO Application on Android
OpenOffice UNO Application on AndroidOpenOffice UNO Application on Android
OpenOffice UNO Application on Android
 
OpenOffice.org Magic Sandbox
OpenOffice.org Magic SandboxOpenOffice.org Magic Sandbox
OpenOffice.org Magic Sandbox
 

Recently uploaded

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

Mosaic Fun with OpenOffice Calc

  • 1. Mosaic Fun with OpenOffice Calc imacat (Yang Shih-Ching) <imacat@mail.imacat.idv.tw> 2012/11/6
  • 2. “Mosaic Fun with OpenOffice Calc” is created by imacat (Yang Shih-Ching), and licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
  • 3. imacat / Yang Shih-Ching ● From Taiwan local OpenOffice community ● A graduate student from the Computer Science Education Laboratory, National Taiwan Normal University ● A member of Women in FOSS in Taiwan ● Was… – A Sun/Oracle freelance lecturer – An OpenOffice RD for 1 year – A web application developer for 8 years
  • 4. This session is all about multimedia and fun. So please relax and enjoy!
  • 5. After all, I’m not a show business professional. I’m a developer. Please forgive me if this is not cool enough. :p
  • 6. Since this is all about multimedia, before we start, lets get some multimedia first! ^_*’
  • 9. I will start by telling a story…
  • 10. Long time ago in the far, far land when I was still a child…
  • 11. Long time ago in the far, far land when I was still a child… Well, actually it was only in this August. :p
  • 12. I saw on my RSS reader...
  • 13. So I followed the story and watched the video…
  • 15. It’s cool, isn’t it? Yes, it’s SO COOL!
  • 16. I forwarded it onto our Google Plus, our Facebook fans page, our forums, local forum, etc.
  • 17. I forwarded it onto our Google Plus, our Facebook fans page, our forums, local forum, etc. Then I put it away and return to my textbook.
  • 18. Until I saw Rob talking about this video the next day…
  • 19. So I watched it again, and also the “behind the scenes”…
  • 21. Well, I think… Yeah, I can do it…
  • 22. Well, I think… Yeah, I can do it… programmatically!
  • 23. Creating mosaic art involves calculating the average colors of image blocks. Since neither OpenOffice BASIC nor UNO API has any method to obtain the colors of individual pixels, I have use Java to do this.
  • 24. So here it is… ^_^
  • 27. No.
  • 28. No, that’s not cool. It’s uglier than the original “Stop-Motion Excel”. It’s not the “eye candy” that I imagined.
  • 29. Why? The original “Stop-Motion Excel” was painted manually, cell by cell. MysteryGuitarMan painted it with a fixed palette, but not “average colors”. It looks sharp. It feels like an animation.
  • 30. Comparing Hand-Painted Colors with Mosaic Average Colors
  • 31. So I need to find something more cool, something sharp, something with a high contrast.
  • 32. That is not an easy task.
  • 33. The idea of Calc Mosaic is not only to create mosaic arts, but also to create stop-motion animations.
  • 34. But it takes averagely 20 seconds to create a spreadsheet of mosaic art with the Java UNO application. I cannot run the animation by creating the mosaic art at real-time.
  • 35. So I turn to another method, to create each frame with a spreadsheet, and play them in sequence, as a stop-motion animation.
  • 36. But then a spreadsheet document can only contain a maximum of 256 spreadsheets.
  • 37. Since I only have 256 frames, this cannot be long.
  • 38. I remembered there is the iPod Ad
  • 39. The iPod Ad… ● Has only 31 seconds, corresponding to 8 FPS if we are having 256 frames.
  • 40. The iPod Ad… ● Has only 31 seconds, corresponding to 8 FPS if we are having 256 frames. ● Has sharp images, high contrasts.
  • 41. The iPod Ad… ● Has only 31 seconds, corresponding to 8 FPS if we are having 256 frames. ● Has sharp images, high contrasts. ● Is very famous.
  • 42. So here it is…
  • 44. At the same time, Villeroy responded to my Calc Mosaic on the forum, using a different approach.
  • 46. So here it is…
  • 48. As you can see, Villeroy places the color values in the cells. The OpenOffice BASIC macro can read and update the cell background colors accordingly. OpenOffice BASIC is a lot faster than Java UNO. This makes it possible to animate at real time.
  • 49. Villeroy’s approach still has some disadvantages…
  • 50. Disadvantages of Villeroy’s Approach ● You still need to have the color values first.
  • 51. Disadvantages of Villeroy’s Approach ● You still need to have the color values first. ● The frame rate is still low.
  • 52. Disadvantages of Villeroy’s Approach ● You still need to have the color values first. ● The frame rate is still low. ● Villeroy updates the colors with styles. – A lot faster than painting the background color cell by cell. – The number of colors to use is limited. That is why it is gray-scaled.
  • 53. This is a different approach than me. But I still got greatly inspired.
  • 54. The color values can be saved in the sheets, and painted with OpenOffice BASIC. This can make it a lot faster.
  • 55. And I know there is the setDataArray() in the interface XCellRangeData. I can populate all the color values at once instead of hundreds of UNO calls to set the CellBackColor property Of SheetCell.
  • 56. The New Process Will Be… 1.Calculates the average colors of mosaic cells with the Java application.
  • 57. The New Process Will Be… 1.Calculates the average colors of mosaic cells with the Java application. 2.Passes the color values from Java to OpenOffice BASIC.
  • 58. The New Process Will Be… 1.Calculates the average colors of mosaic cells with the Java application. 2.Passes the color values from Java to OpenOffice BASIC. 3.Paints the background colors of the spreadsheet cells with the OpenOffice BASIC macro.
  • 59. So the problem becomes: Writing an application both in Java and OpenOffice BASIC.
  • 60. So the problem becomes: Writing an application both in Java and OpenOffice BASIC. Or, simply, Creating the OpenOffice BASIC macros through the UNO API with Java.
  • 61. In the unpublished UNO API, there is a BasicLibraries property in OfficeDocument that application developers can access, insert or delete the BASIC macros.
  • 62. There’s also the XScriptProvider interface that I can use it to invoke the existing OpenOffice macros.
  • 63. So I use them to “inject” the BASIC macros into the newly-created spreadsheet document, and run these macros.
  • 64. In fact, I don’t even need to use setDataArray() to paste the color values into the spreadsheets. I can pass the color values as parameters to the invoked BASIC macros.
  • 65. This is troublesome, but the result is amazing. It is 8 times faster then before!
  • 66. When I prepare for this presentation, I became more and more greedy.
  • 67. I want something new, something hot, something gets people excited!
  • 68. Then I came across this…
  • 70. Well, again, I think…
  • 71. Well, again, I think… Yeah, I can do it!
  • 72. The Gangnam Style song is 4:12 long. That is 252 seconds. With 10 FPS, it needs 2520 spreadsheets. That is 10 spreadsheet documents. (Each has a maximum of 256 spreadsheets.)
  • 73. I can then concatenate the 10 recorded videos, join them into one, and create an OpenOffice Calc Style.
  • 74. So here is it. Enjoy!