SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Downloaden Sie, um offline zu lesen
Apache Sanselan
Apache Sanselan
•   A pure-Java image library
•   Reading and writing of images
•   Support for various image formats
•   Extracting image meta information




                                        2
History of Sanselan
• Initiated by Charles M. Chen in 2004
• Open source since 2004
  – Apache Licence
• Stable code base
• Used by several projects
• Entered incubator in September

                                         3
Features of Sanselan
    • Portable toolkit (pure Java)
    • Correctness over performance
    • Not tied to files
      – Byte arrays, input streams
    • Simple but powerful API



4
Features of Sanselan
• File format identification
• Fast extraction (without reading the image
  data) of
  – image info
  – icc profile
  – image metadata
• Reading and writing
Supported Formats
    PNG
•
    GIF
•
•   TIFF (EXIF support)
•   BMP
•   PNM/PGM/PBM/PPM
•   ICO, PSD/Photoshop (read only)
•   JPEG (read only) – EXIF support
Code Samples
// how to read an image:
byte imageBytes[] = someBytes;
BufferedImage image_1 =
      Sanselan.getBufferedImage(imageBytes);


// Write an image.
BufferedImage image = someImage;
File dst = someFile;
ImageFormat format =
          ImageFormat.IMAGE_FORMAT_PNG;
Map optional_params = new Hashtable();
Sanselan.write(image, dst, format, optional_params);
Code Samples
// get the image's width and height.
Dimension d = Sanselan.getImageSize(imageBytes);

// get all of the image's info (ie. bits per pixel, size,
// transparency, etc.)
ImageInfo image_info =
      Sanselan.getImageInfo(imageBytes);

if (image_info.getColorType() ==
         ImageInfo.COLOR_TYPE_GRAYSCALE)
     System.out.println(quot;Grayscale image.quot;);
if (image_info.getHeight() > 1000)
     System.out.println(quot;Large image.quot;);
Code Samples
// try to guess the image's format.
ImageFormat image_format =
      Sanselan.guessFormat(imageBytes);
image_format.equals(
      ImageFormat.IMAGE_FORMAT_PNG);

// get all metadata stored in EXIF format
// (ie. from JPEG or TIFF).
IImageMetadata metdata =
         Sanselan.getMetadata(imageBytes);
Sanselan Today – Check It Out
     • Code base is in SVN
       – Buildable with Maven 2
     • Paper work is finished
     • Website is set up
       – Documentation will follow soon :)
     • Incubator release (stable code base) soon
     • Future: growth – features and community
10
Q&A

Weitere ähnliche Inhalte

Ähnlich wie Apache Con Us2007 Sanselan

Steganoid - A tool for steganography
Steganoid - A tool for steganographySteganoid - A tool for steganography
Steganoid - A tool for steganographyMrMoliya
 
Advanced Imaging on iOS
Advanced Imaging on iOSAdvanced Imaging on iOS
Advanced Imaging on iOSrsebbe
 
Technical glossary
Technical glossaryTechnical glossary
Technical glossaryhalo4robo
 
CRUD Operation of images through XML
CRUD Operation of images through XMLCRUD Operation of images through XML
CRUD Operation of images through XMLAnshudha Maheshwari
 
Performance and Memory Tuning - Part III - Transcript.pdf
Performance and Memory Tuning - Part III - Transcript.pdfPerformance and Memory Tuning - Part III - Transcript.pdf
Performance and Memory Tuning - Part III - Transcript.pdfShaiAlmog1
 
Stem 71 24 multimedia elements - graphics
Stem 71 24   multimedia elements - graphicsStem 71 24   multimedia elements - graphics
Stem 71 24 multimedia elements - graphicsKelly Bauer
 
Image file formats
Image file formatsImage file formats
Image file formatsKarlRubin
 
A Tutorial On Ip 2
A Tutorial On Ip 2A Tutorial On Ip 2
A Tutorial On Ip 2ankuredkie
 
Introduction to Authorware
Introduction to AuthorwareIntroduction to Authorware
Introduction to AuthorwareJazihan Mahat
 
Highlights of F# lightning talk
Highlights of F# lightning talkHighlights of F# lightning talk
Highlights of F# lightning talkmbhwork
 
Technical glossary
Technical glossaryTechnical glossary
Technical glossaryhalo4robo
 
Techincal glossery
Techincal glosseryTechincal glossery
Techincal glosseryxChiip
 
Supporting Significant Properties in a Working Archive (SPs part 5), by Steph...
Supporting Significant Properties in a Working Archive (SPs part 5), by Steph...Supporting Significant Properties in a Working Archive (SPs part 5), by Steph...
Supporting Significant Properties in a Working Archive (SPs part 5), by Steph...JISC KeepIt project
 
What's a Core Image? An Image-Processing Framework on iOS and OS X
What's a Core Image? An Image-Processing Framework on iOS and OS XWhat's a Core Image? An Image-Processing Framework on iOS and OS X
What's a Core Image? An Image-Processing Framework on iOS and OS XFlatiron School
 
Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Alvaro Soto
 
Kinect v2 Introduction and Tutorial
Kinect v2 Introduction and TutorialKinect v2 Introduction and Tutorial
Kinect v2 Introduction and TutorialTsukasa Sugiura
 

Ähnlich wie Apache Con Us2007 Sanselan (20)

Steganoid - A tool for steganography
Steganoid - A tool for steganographySteganoid - A tool for steganography
Steganoid - A tool for steganography
 
Advanced Imaging on iOS
Advanced Imaging on iOSAdvanced Imaging on iOS
Advanced Imaging on iOS
 
Image Converter
Image ConverterImage Converter
Image Converter
 
Technical glossary
Technical glossaryTechnical glossary
Technical glossary
 
CRUD Operation of images through XML
CRUD Operation of images through XMLCRUD Operation of images through XML
CRUD Operation of images through XML
 
Performance and Memory Tuning - Part III - Transcript.pdf
Performance and Memory Tuning - Part III - Transcript.pdfPerformance and Memory Tuning - Part III - Transcript.pdf
Performance and Memory Tuning - Part III - Transcript.pdf
 
Unit 78 technical file
Unit 78 technical fileUnit 78 technical file
Unit 78 technical file
 
Stem 71 24 multimedia elements - graphics
Stem 71 24   multimedia elements - graphicsStem 71 24   multimedia elements - graphics
Stem 71 24 multimedia elements - graphics
 
Image file formats
Image file formatsImage file formats
Image file formats
 
A Tutorial On Ip 2
A Tutorial On Ip 2A Tutorial On Ip 2
A Tutorial On Ip 2
 
Introduction to Authorware
Introduction to AuthorwareIntroduction to Authorware
Introduction to Authorware
 
Highlights of F# lightning talk
Highlights of F# lightning talkHighlights of F# lightning talk
Highlights of F# lightning talk
 
Technical glossary
Technical glossaryTechnical glossary
Technical glossary
 
Techincal glossery
Techincal glosseryTechincal glossery
Techincal glossery
 
Core Image
Core ImageCore Image
Core Image
 
Supporting Significant Properties in a Working Archive (SPs part 5), by Steph...
Supporting Significant Properties in a Working Archive (SPs part 5), by Steph...Supporting Significant Properties in a Working Archive (SPs part 5), by Steph...
Supporting Significant Properties in a Working Archive (SPs part 5), by Steph...
 
What's a Core Image? An Image-Processing Framework on iOS and OS X
What's a Core Image? An Image-Processing Framework on iOS and OS XWhat's a Core Image? An Image-Processing Framework on iOS and OS X
What's a Core Image? An Image-Processing Framework on iOS and OS X
 
Sources of Photos and Graphics
Sources of Photos and GraphicsSources of Photos and Graphics
Sources of Photos and Graphics
 
Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016
 
Kinect v2 Introduction and Tutorial
Kinect v2 Introduction and TutorialKinect v2 Introduction and Tutorial
Kinect v2 Introduction and Tutorial
 

Mehr von day

Scala for scripting
Scala for scriptingScala for scripting
Scala for scriptingday
 
Scala4sling
Scala4slingScala4sling
Scala4slingday
 
Testing Zen
Testing ZenTesting Zen
Testing Zenday
 
Java Persistence Frameworks
Java Persistence FrameworksJava Persistence Frameworks
Java Persistence Frameworksday
 
Embrace OSGi Apache Con Europe2009
Embrace OSGi Apache Con Europe2009Embrace OSGi Apache Con Europe2009
Embrace OSGi Apache Con Europe2009day
 
Scripting Yor Java Application with BSF3
Scripting Yor Java Application with BSF3Scripting Yor Java Application with BSF3
Scripting Yor Java Application with BSF3day
 
Tarpm Clustering
Tarpm ClusteringTarpm Clustering
Tarpm Clusteringday
 
Tech Summit 08 Support Initiative
Tech Summit 08 Support InitiativeTech Summit 08 Support Initiative
Tech Summit 08 Support Initiativeday
 
Non Cms For Web Apps
Non Cms For Web AppsNon Cms For Web Apps
Non Cms For Web Appsday
 
Getting Into The Flow With Cq Dam
Getting Into The Flow With Cq DamGetting Into The Flow With Cq Dam
Getting Into The Flow With Cq Damday
 
Dispatcher Oom
Dispatcher OomDispatcher Oom
Dispatcher Oomday
 
Advanced Collaboration And Beyond
Advanced Collaboration And BeyondAdvanced Collaboration And Beyond
Advanced Collaboration And Beyondday
 
Wc Mand Connectors2
Wc Mand Connectors2Wc Mand Connectors2
Wc Mand Connectors2day
 
Jackrabbit Roadmap
Jackrabbit RoadmapJackrabbit Roadmap
Jackrabbit Roadmapday
 
Doc Book Vs Dita
Doc Book Vs DitaDoc Book Vs Dita
Doc Book Vs Ditaday
 
Doc Book Vs Dita Teresa
Doc Book Vs Dita TeresaDoc Book Vs Dita Teresa
Doc Book Vs Dita Teresaday
 
862
862862
862day
 
Apache Con U S07 F F T Sling
Apache Con U S07  F F T  SlingApache Con U S07  F F T  Sling
Apache Con U S07 F F T Slingday
 
200711 R E S T Apache Con
200711  R E S T  Apache Con200711  R E S T  Apache Con
200711 R E S T Apache Conday
 

Mehr von day (19)

Scala for scripting
Scala for scriptingScala for scripting
Scala for scripting
 
Scala4sling
Scala4slingScala4sling
Scala4sling
 
Testing Zen
Testing ZenTesting Zen
Testing Zen
 
Java Persistence Frameworks
Java Persistence FrameworksJava Persistence Frameworks
Java Persistence Frameworks
 
Embrace OSGi Apache Con Europe2009
Embrace OSGi Apache Con Europe2009Embrace OSGi Apache Con Europe2009
Embrace OSGi Apache Con Europe2009
 
Scripting Yor Java Application with BSF3
Scripting Yor Java Application with BSF3Scripting Yor Java Application with BSF3
Scripting Yor Java Application with BSF3
 
Tarpm Clustering
Tarpm ClusteringTarpm Clustering
Tarpm Clustering
 
Tech Summit 08 Support Initiative
Tech Summit 08 Support InitiativeTech Summit 08 Support Initiative
Tech Summit 08 Support Initiative
 
Non Cms For Web Apps
Non Cms For Web AppsNon Cms For Web Apps
Non Cms For Web Apps
 
Getting Into The Flow With Cq Dam
Getting Into The Flow With Cq DamGetting Into The Flow With Cq Dam
Getting Into The Flow With Cq Dam
 
Dispatcher Oom
Dispatcher OomDispatcher Oom
Dispatcher Oom
 
Advanced Collaboration And Beyond
Advanced Collaboration And BeyondAdvanced Collaboration And Beyond
Advanced Collaboration And Beyond
 
Wc Mand Connectors2
Wc Mand Connectors2Wc Mand Connectors2
Wc Mand Connectors2
 
Jackrabbit Roadmap
Jackrabbit RoadmapJackrabbit Roadmap
Jackrabbit Roadmap
 
Doc Book Vs Dita
Doc Book Vs DitaDoc Book Vs Dita
Doc Book Vs Dita
 
Doc Book Vs Dita Teresa
Doc Book Vs Dita TeresaDoc Book Vs Dita Teresa
Doc Book Vs Dita Teresa
 
862
862862
862
 
Apache Con U S07 F F T Sling
Apache Con U S07  F F T  SlingApache Con U S07  F F T  Sling
Apache Con U S07 F F T Sling
 
200711 R E S T Apache Con
200711  R E S T  Apache Con200711  R E S T  Apache Con
200711 R E S T Apache Con
 

Kürzlich hochgeladen

Upgrade Your Banking Experience with Advanced Core Banking Applications
Upgrade Your Banking Experience with Advanced Core Banking ApplicationsUpgrade Your Banking Experience with Advanced Core Banking Applications
Upgrade Your Banking Experience with Advanced Core Banking ApplicationsIntellect Design Arena Ltd
 
Team B Mind Map for Organizational Chg..
Team B Mind Map for Organizational Chg..Team B Mind Map for Organizational Chg..
Team B Mind Map for Organizational Chg..dlewis191
 
UNLEASHING THE POWER OF PROGRAMMATIC ADVERTISING
UNLEASHING THE POWER OF PROGRAMMATIC ADVERTISINGUNLEASHING THE POWER OF PROGRAMMATIC ADVERTISING
UNLEASHING THE POWER OF PROGRAMMATIC ADVERTISINGlokeshwarmaha
 
NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023Steve Rader
 
A flour, rice and Suji company in Jhang.
A flour, rice and Suji company in Jhang.A flour, rice and Suji company in Jhang.
A flour, rice and Suji company in Jhang.mcshagufta46
 
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...AustraliaChapterIIBA
 
Developing Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, OursDeveloping Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, OursKaiNexus
 
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdfGraham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdfAnhNguyen97152
 
Lecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb toLecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb toumarfarooquejamali32
 
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView
 
Mihir Menda - Member of Supervisory Board at RMZ
Mihir Menda - Member of Supervisory Board at RMZMihir Menda - Member of Supervisory Board at RMZ
Mihir Menda - Member of Supervisory Board at RMZKanakChauhan5
 
Tata Kelola Bisnis perushaan yang bergerak
Tata Kelola Bisnis perushaan yang bergerakTata Kelola Bisnis perushaan yang bergerak
Tata Kelola Bisnis perushaan yang bergerakEditores1
 
Introduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptxIntroduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptxJemalSeid25
 
PDT 89 - $1.4M - Seed - Plantee Innovations.pdf
PDT 89 - $1.4M - Seed - Plantee Innovations.pdfPDT 89 - $1.4M - Seed - Plantee Innovations.pdf
PDT 89 - $1.4M - Seed - Plantee Innovations.pdfHajeJanKamps
 
Intellectual Property Licensing Examples
Intellectual Property Licensing ExamplesIntellectual Property Licensing Examples
Intellectual Property Licensing Examplesamberjiles31
 
MC Heights construction company in Jhang
MC Heights construction company in JhangMC Heights construction company in Jhang
MC Heights construction company in Jhangmcgroupjeya
 
NewBase 25 March 2024 Energy News issue - 1710 by Khaled Al Awadi_compress...
NewBase  25 March  2024  Energy News issue - 1710 by Khaled Al Awadi_compress...NewBase  25 March  2024  Energy News issue - 1710 by Khaled Al Awadi_compress...
NewBase 25 March 2024 Energy News issue - 1710 by Khaled Al Awadi_compress...Khaled Al Awadi
 
Data skills for Agile Teams- Killing story points
Data skills for Agile Teams- Killing story pointsData skills for Agile Teams- Killing story points
Data skills for Agile Teams- Killing story pointsyasinnathani
 

Kürzlich hochgeladen (20)

Upgrade Your Banking Experience with Advanced Core Banking Applications
Upgrade Your Banking Experience with Advanced Core Banking ApplicationsUpgrade Your Banking Experience with Advanced Core Banking Applications
Upgrade Your Banking Experience with Advanced Core Banking Applications
 
Team B Mind Map for Organizational Chg..
Team B Mind Map for Organizational Chg..Team B Mind Map for Organizational Chg..
Team B Mind Map for Organizational Chg..
 
UNLEASHING THE POWER OF PROGRAMMATIC ADVERTISING
UNLEASHING THE POWER OF PROGRAMMATIC ADVERTISINGUNLEASHING THE POWER OF PROGRAMMATIC ADVERTISING
UNLEASHING THE POWER OF PROGRAMMATIC ADVERTISING
 
NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023
 
A flour, rice and Suji company in Jhang.
A flour, rice and Suji company in Jhang.A flour, rice and Suji company in Jhang.
A flour, rice and Suji company in Jhang.
 
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...
 
Developing Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, OursDeveloping Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, Ours
 
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdfGraham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdf
 
Lecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb toLecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb to
 
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
 
Mihir Menda - Member of Supervisory Board at RMZ
Mihir Menda - Member of Supervisory Board at RMZMihir Menda - Member of Supervisory Board at RMZ
Mihir Menda - Member of Supervisory Board at RMZ
 
Investment Opportunity for Thailand's Automotive & EV Industries
Investment Opportunity for Thailand's Automotive & EV IndustriesInvestment Opportunity for Thailand's Automotive & EV Industries
Investment Opportunity for Thailand's Automotive & EV Industries
 
WAM Corporate Presentation Mar 25 2024.pdf
WAM Corporate Presentation Mar 25 2024.pdfWAM Corporate Presentation Mar 25 2024.pdf
WAM Corporate Presentation Mar 25 2024.pdf
 
Tata Kelola Bisnis perushaan yang bergerak
Tata Kelola Bisnis perushaan yang bergerakTata Kelola Bisnis perushaan yang bergerak
Tata Kelola Bisnis perushaan yang bergerak
 
Introduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptxIntroduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptx
 
PDT 89 - $1.4M - Seed - Plantee Innovations.pdf
PDT 89 - $1.4M - Seed - Plantee Innovations.pdfPDT 89 - $1.4M - Seed - Plantee Innovations.pdf
PDT 89 - $1.4M - Seed - Plantee Innovations.pdf
 
Intellectual Property Licensing Examples
Intellectual Property Licensing ExamplesIntellectual Property Licensing Examples
Intellectual Property Licensing Examples
 
MC Heights construction company in Jhang
MC Heights construction company in JhangMC Heights construction company in Jhang
MC Heights construction company in Jhang
 
NewBase 25 March 2024 Energy News issue - 1710 by Khaled Al Awadi_compress...
NewBase  25 March  2024  Energy News issue - 1710 by Khaled Al Awadi_compress...NewBase  25 March  2024  Energy News issue - 1710 by Khaled Al Awadi_compress...
NewBase 25 March 2024 Energy News issue - 1710 by Khaled Al Awadi_compress...
 
Data skills for Agile Teams- Killing story points
Data skills for Agile Teams- Killing story pointsData skills for Agile Teams- Killing story points
Data skills for Agile Teams- Killing story points
 

Apache Con Us2007 Sanselan

  • 2. Apache Sanselan • A pure-Java image library • Reading and writing of images • Support for various image formats • Extracting image meta information 2
  • 3. History of Sanselan • Initiated by Charles M. Chen in 2004 • Open source since 2004 – Apache Licence • Stable code base • Used by several projects • Entered incubator in September 3
  • 4. Features of Sanselan • Portable toolkit (pure Java) • Correctness over performance • Not tied to files – Byte arrays, input streams • Simple but powerful API 4
  • 5. Features of Sanselan • File format identification • Fast extraction (without reading the image data) of – image info – icc profile – image metadata • Reading and writing
  • 6. Supported Formats PNG • GIF • • TIFF (EXIF support) • BMP • PNM/PGM/PBM/PPM • ICO, PSD/Photoshop (read only) • JPEG (read only) – EXIF support
  • 7. Code Samples // how to read an image: byte imageBytes[] = someBytes; BufferedImage image_1 = Sanselan.getBufferedImage(imageBytes); // Write an image. BufferedImage image = someImage; File dst = someFile; ImageFormat format = ImageFormat.IMAGE_FORMAT_PNG; Map optional_params = new Hashtable(); Sanselan.write(image, dst, format, optional_params);
  • 8. Code Samples // get the image's width and height. Dimension d = Sanselan.getImageSize(imageBytes); // get all of the image's info (ie. bits per pixel, size, // transparency, etc.) ImageInfo image_info = Sanselan.getImageInfo(imageBytes); if (image_info.getColorType() == ImageInfo.COLOR_TYPE_GRAYSCALE) System.out.println(quot;Grayscale image.quot;); if (image_info.getHeight() > 1000) System.out.println(quot;Large image.quot;);
  • 9. Code Samples // try to guess the image's format. ImageFormat image_format = Sanselan.guessFormat(imageBytes); image_format.equals( ImageFormat.IMAGE_FORMAT_PNG); // get all metadata stored in EXIF format // (ie. from JPEG or TIFF). IImageMetadata metdata = Sanselan.getMetadata(imageBytes);
  • 10. Sanselan Today – Check It Out • Code base is in SVN – Buildable with Maven 2 • Paper work is finished • Website is set up – Documentation will follow soon :) • Incubator release (stable code base) soon • Future: growth – features and community 10
  • 11. Q&A