Sometimes I have to put text on a path
Showing posts with label WebP. Show all posts
Showing posts with label WebP. Show all posts

Sunday, July 10, 2011

Image Python API and Google app engine; modified Guestbook-hello application with images API;Python Imaging Library

1) Images Python API Overview:
http://code.google.com/appengine/docs/python/images/overview.html

App Engine provides the ability to manipulate image data using a dedicated Images service. The Images service can resize, rotate, flip, and crop images; it can composite multiple images into a single image; and it can convert image data between several formats. It can also enhance photographs using a predefined algorithm. The API can also provide information about an image, such as its format, width, height, and a histogram of color values.
The Images service can accept image data directly from the app, or it can use a Blobstore value (http://code.google.com/appengine/docs/python/blobstore/). When the source is the Blobstore, the size of the image to transform can be up to the maximum size of a Blobstore value. However, the transformed image is returned directly to the app, and so must be no larger than 32 megabytes (this is potentially useful for making thumbnail images of photographs uploaded to the Blobstore by users).

2)Download and install
In order to use the Images API in your local environment you must first download and install PIL, the Python Imaging Library. PIL is not available on App Engine; it is only used as a stub for the Images API in your local environment. Only the transforms provided in the images API are available on App Engine.
The Python development server uses the Python Imaging Library (PIL) to simulate the Image service. This library is not included with the Python standard library or the SDK, and must be installed separately. See Installing PIL: http://code.google.com/appengine/docs/python/images/installingPIL.html
The WEBP image format is only supported if a suitable PIL decoder plugin has been installed.


The Images service can 1)resize (resize the image while maintaining the same aspect ratio), 2)rotate, 3)flip, 4)crop images, and 5)enhance photographs (The "I'm Feeling Lucky" transform enhances dark and bright colors in an image and adjusts both color and contrast to optimal levels). It can also composite multiple images into a single image.

The service accepts image data in the JPEG, PNG, WEBP, GIF (including animated GIF), BMP, TIFF and ICO formats. It can return transformed images in the JPEG, WEBP and PNG formats. If the input format and the output format are different, the service converts the input data to the output format before performing the transformation.

To install PIL on Mac OS X 10.4 and higher (http://code.google.com/appengine/docs/python/images/installingPIL.html):
Download the PIL .dmg file. For example, you can download the PIL 1.1.6 .dmg file from http://pythonmac.org/packages/py25-fat/index.html
Double-click on the installer to start the installation process.
Choose the correct directory.
Finish the installation.
---------------------------
3)Using the Images Python API
http://code.google.com/appengine/docs/python/images/usingimages.html

3-a) Creating a image property AND Uploading User Images:
The first thing we need to do is update the model from the guestbook sample (http://ex-ample.blogspot.com/2011/07/first-steps-google-appengine-mac.html and http://ex-ample.blogspot.com/2011/07/hello-with-google-app-engine-and-webapp.html) to store the uploaded image as a blob.

3-b) composite image from multiple images: http://code.google.com/appengine/docs/python/images/functions.html
The format of the final composite image, either PNG or JPEG. The default is PNG.


Image is provided by the google.appengine.api.images module:
http://code.google.com/appengine/docs/python/images/imageclass.html
Image()
Properties:

  • width
  • height

Instance methods:

  • crop()
  • execute_transforms()
  • histogram()
  • horizontal_flip()
  • im_feeling_lucky()
  • resize()
  • rotate()
  • vertical_flip()

Tuesday, July 5, 2011

moustachio.appspot: google app engine and Go (programming language); demos/examples;Go on App Engine makes it possible to deploy efficient, CPU-intensive web applications

Start with this "ex-ample": 
http://moustach-io.appspot.com/
Tutorial of Moustachio (a Go-GEA (Go google engine app)):
1)enter a log account (just an email)

2)select and upload your image (here a .png of 600KB (1:3), 650X755 pixels (0.5MPix))
(i also try a .webP (same image with high quality : a ratio of 1:18 (100KB))).


3)click to select the moustache position
click "share"



4-a)click "google buzz logo"
you get
"https://accounts.google.com/o/oauth2/auth?response_type=code&scope=https://www.googleapis.com/auth/buzz&redirect_uri=...."
with this window:


An error can occurs if you spend time... 

 Post successful:

clic on the image (PC: right or mac: ctrl click) and you get the local menu with these items and you can save your image on your local hard disk:
 The defaut name of the image is "vi":
 Finally the file is a .jpeg of 25KB (1:27) with the same 650X755 pixels.

you have also an URL for your image:
http://moustach-io.appspot.com/v/13a451cec2898e4a

4-b) If you select "twitter", this Go-GEA creates this URL:  http://twitter.com/intent/session?return_to=%2Fintent%2Ftweet%3Fsource%3Dwebclient%26text%3DMoustachio%2Bhttp%253A%252F%252Fmoustach-io.appspot.com%252Fv%252F13a451cec2898e4a&source=webclient&text=Moustachio+http%3A%2F%2Fmoustach-io.appspot.com%2Fv%2F13a451cec2898e4a

If your have been connected then you will get this window:
That's all!!!

-------------------source
moutachio.appspot.com is an example:
http://code.google.com/p/appengine-go/source/browse/example/

Get a local copy of the appengine-go repository with this command (clone with mercurial):
http://code.google.com/p/appengine-go/source/checkout

When you download the SDK (go_appengine_sdk_darwin_386-1.5.0.zip) and install on your local hard disk,
in the menu demos, the source is in  go-moustachio.

----see:
http://code.google.com/appengine/docs/go/gettingstarted/

---- code of (http://moustach-io.appspot.com/)
http://code.google.com/p/appengine-go/source/browse/#hg%2Fexample%2Fmoustachio
This program requires the freetype-go and goauth2 libraries:
http://code.google.com/p/appengine-go/source/browse/example/moustachio/README

They should be checked out in this directory under these paths:

freetype-go.googlecode.com
goauth2.googlecode.com

This is so that these packages can be imported by Moustachio:

"freetype-go.googlecode.com/hg/freetype/raster"
"goauth2.googlecode.com/hg/oauth"

You can do this by running these commands:

hg clone https://freetype-go.googlecode.com/hg \
freetype-go.googlecode.com/hg

hg clone https://goauth2.googlecode.com/hg \
goauth2.googlecode.com/hg

------------------go-and-google-app-engine


http://blog.golang.org/2011/05/go-and-google-app-engine.html
Google’s App Engine provides a reliable, scalable, easy way to build and deploy applications for the web. Over a hundred thousand apps are hosted at appspot.com and custom domains using the App Engine infrastructure.
Originally written for Python apps, in 2009 the system added a Java runtime. And today (@may 2011), at Google I/O, we’re thrilled to announce that Go will be next.

You don’t even need to have Go installed beforehand because the SDK is fully self-contained. Just download the SDK, unzip it, and start coding. Moreover, the SDK’s “dev app server” means you don’t even need to run the compiler yourself; everything is delightfully automatic.

Code is deployed in source form and compiled in the cloud using the 64-bit x86 compiler (6g), making it the first true compiled language that runs on App Engine. Go on App Engine makes it possible to deploy efficient, CPU-intensive web applications.

-----------deployment of Go apps 
Today (since @may 2011), through the SDK, you’ll be able to write web apps, learn about the APIs (and the language, if it’s new to you), and run your web app locally. Once full deployment is enabled, it’ll be easy to push your app to Google’s cloud.

http://blog.golang.org/2011/05/go-and-google-app-engine.html

Please note that deployment of Go apps is currently restricted to
trusted testers only. The appcfg.py tool will give an error message if
you have not been listed as a trusted tester.
To become a trusted tester, sign up using this form: http://goo.gl/otZVa
We will be letting in more testers over the next few weeks as we
smooth out any issues that arise.


We are no longer accepting Trusted Tester applications (@june 2011). We hope to open the
service to the general public soon.
---

Friday, July 1, 2011

comparison of PDF (and other files) web services: converters, editors and viewers; Standardization (ISO) and Document management system: Portable Document Format.

*.PDF = ISO 32000


---1---Standardization
Many industry associations publish their own lists of particular document control standards.
Following is a list of some of the relevant ISO documents. Divisions ICS 01.140.10 and 01.140.20.
The ISO has also published a series of standards regarding the technical documentation, covered by the division of 01.110.
ISO 2709 Information and documentation — Format for information exchange
ISO 15836 Information and documentation — The Dublin Core metadata element set
ISO 15489 Information and documentation — Records management
ISO 21127 Information and documentation — A reference ontology for the interchange of cultural heritage information
ISO 23950 Information and documentation — Information retrieval (Z39.50) — Application service definition and protocol specification
ISO 10244 Document management — Business process baselining and analysis
ISO 32000 Document management — Portable document format

Document management system - Wikipedia, the free encyclopedia:
http://en.wikipedia.org/wiki/Document_management_system

----------The PDF combines 3 technologies:
  1. A subset of the PostScript page description programming language, for generating the layout and graphics.
  2. A font-embedding/replacement system to allow fonts to travel with the documents.
  3. A structured storage system to bundle these elements and any associated content into a single file (with data compression where appropriate).
-----2----brief history
PDF was originally a proprietary format controlled by Adobe, and was officially released as an open standard on July 1, 2008, and published by the International Organization for Standardization as ISO 32000-1:2008

The ISO 32000-1 allows use of some specifications, which are not standardized e.g. Adobe XML Forms Architecture:


------3----- Web services 

Converters


Editors

  • http://www.pdfescape.com/
    PDFescape
    : a free web service to view, create forms, fill out forms, and edit PDF documents from a web browser (requires JavaScript to be enabled). PDFescape is a free of charge web-based PDF editor program written in JavaScript, HTML, CSS and ASP.
    alexa: 27 000 (@july 2011)
  • https://docq.com/landing/pdfvue
    PDFVue: a free web application that allows the user to view PDF's, comment and fill PDF forms from a web browser. Generates a watermark. It's also a converter.
    alexa: 717 000 (@july 2011)
  • -------
  • Qoppa PDF Libraries: Java beans for viewing and annotating PDF files to be integrated in an applet. The commercial Qoppa PDF libraries are a suite of Java class libraries and Java bean components developed by Qoppa Software; also Android platform.


Viewers

  • http://a.nnotate.com/php/home.php
    A.nnotate - a web service which views PDF documents as HTML in the browser, with annotation features.
    The basic service is free: just register and you can upload 30 new pages a month and make unlimited notes. Your free account includes private web space for:Uploading documents, including PDF, DOC, DOCX, PowerPoint, OpenOffice, Spreadsheets.Uploading images (PNG, GIF and JPEG)Making private snapshots of web pagesAttaching notes to documents and imagesSharing documents and notes:OpenJason includes it in their list of 44 excellent productivity tools http://www.openjason.com/2008/07/28/44-excellent-productivity-tools/
    alexa : 440 000 (@july 2011)
  • http://crocodoc.com/
    Crocodoc - a free web service which allows annotating PDFs and saving them
    Crocodoc's API is free for non-commercial use.
    alexa :144 000 
    (@july 2011)
  • http://www.digisigner.com/products.html
    DigiSigner - you must download;  free online PDF viewer java applet with additional function to digitally sign PDF documents; free Third Party Libraries.
    alexa:  >2 000 000 
     (@july 2011)
  • Docstoc - a web service which allows viewing/embedding documents (Docstoc Viewer) and file hosting services. It support these file types: Adobe PDF (.pdf), MS Word (.doc, .docx), MS Excel (.xls, .xlsx), MS Powerpoint (.ppt, .pps, .pptx), Rich Text Format (.rtf), Plain Text (.txt)alexa: 926 (@july 2011)
  • docs.google.com
    Google Docs: the well-known web service. For PDF file: it views PDF documents as JPEG images in the browser;Google Docs also allows for uploading, and saving to the Portable Document Format. PDF files can be viewed but not edited!!!
    It's a free, Web-based word processor, spreadsheet, slide show, form, and data storage service offered by Google: 1GB of free space. Documents can be saved to a user's local computer in a variety of formats including: (ODF, HTML, PDF, RTF, Text, Microsoft Office). The application supports two ISO standard document formats: OpenDocument (for both opening and exporting) and Office Open XML (for opening only). Individual documents may not exceed 1GB (@January 2010), embedded images must not exceed 2MB each, and spreadsheets are limited to 256 columns, 200,000 cells, and 99 sheets. In September 2009, an equation editor was added which allows rendering in LaTeX format. However, Google Docs lacks an equation numbering feature.
    Google Spreadsheets and Google Sites also incorporate Google Apps Script to write code within documents in a similar way to VBA in Microsoft Office. The scripts can be activated either by user action or by a trigger in response to an event (http://www.readwriteweb.com/enterprise/2010/10/google-apps-scripts.php).
    The Android Google Docs app can also take a photo of a document, sign, or other text and use Optical Character Recognition to convert to text that can be edited:
    http://googlemobile.blogspot.com/2011/04/introducing-new-google-docs-app-for.html
    off-line access:  the Google Docs Blog announced that offline access would be returning in 2011 with the use of HTML5:
    http://googledocs.blogspot.com/2010/12/update-on-google-docs-offline-and-new.html
    http://techcrunch.com/2011/05/11/offline-gmail/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Techcrunch+%28TechCrunch%29
    Check out the latest new features: http://www.google.com/google-d-s/whatsnew.html
    off-line acces withwww.syncplicity.com
    Document statistics: Ever wonder if people are actually looking at the document you’ve shared? Wonder no longer. By clicking the Discussions button and then the Document stats link, you can now see the 7-day activity of your doc.
  • http://www.scribd.com/http://www.scribd.com/html5
    Scribd: a web service which renders PDF documents as HTML5 in the browser. It's a Web 2.0 based document-sharing website which allows users to post documents of various formats, and embed them into a web page using its iPaper format.
    Upload Multiple Doc online and with a desktop uploader (only mac OSX).
    alexa: 196 (@july 2011)
  • http://www.vuzit.com/
    vuzit: a web service which views PDF documents (and 40 others) as HTML5 in the browser via AJAX. The Vuzit Viewer is free for limited use.
    alexa: 400 000 
    (@july 2011)
and desktop acrobat reader...

Monday, June 13, 2011

WebP, WebM


logo webP: http://code.google.com/speed/webp/images/webplogo.png



----------------------------Intro 
WebP is an image format for lossy compressed image files. The format was first announced in 2010 by google.
WebP est un format d'image annoncé par Google en 2010 (comme nouveau mais en fait ce n'est qu'un composant du VP8).

As a derivative of the video format VP8, it is a "sister project" to the multimedia format WebM.
Il exploite un algorithme de compression avec pertes prédictif utilisé pour les images clés du VP8 qui est le codec vidéo du format WebM. 
Pour les images telles les captures d'écran avec des grands aplats et des textes, un format de compression sans pertes comme le PNG est plus adapté.
----------------------------Compatibili: 
The Google Chrome Frame plug-in for Internet Explorer and Opera 11.10.
http://www.google.com/chromeframe

All WebM-compatible browsers may also display WebP via a javascript shim:

Google has released a plug-in for Microsoft Windows that enables WebP support in Microsoft Office 2010:
For mac , use graphic converter (safari downloads webP file).

Convert your favorite collection from PNG and JPEG to WebP by downloading the precompiled cwebp conversion tool for Linux, Windows or Mac OS X.

Gmail and Picasa Web Albums (Google web applications) support WebP.
----------------------------Metadata 
The RIFF container leads to an overhead of only 20 bytes and can hold additional metadata.
Le fichier webp peut contenir jusqu'à 4 métadonnées supplémentaires (nom de l'auteur, titre de l'image, informations sur le droit d'auteur, commentaires).
----------------------------Bookmark 
----------------------------Use
The Previews feature of Google Search currently uses WebP internally to reduce disk space.
----------------------------Criticism
1) size: 
WebP is bitstream-compatible with VP8 and uses 14 bits for width and height. 
The maximum file size for WebP is 16383x16383 pixels.
La taille maximale d'une image WebP est de 16 383 × 16 383 pixels, soit environ 260 mégapixels.
This seems very limited given 25+MP cameras these days—and increasing.

2) blur: 
3) google?
Faut-il craindre l'abus de position dès ce niveau?
4)...