Skip to content

Commit

Permalink
Merge pull request #55 from lahdekorpi/patch-1
Browse files Browse the repository at this point in the history
Make README more readable
  • Loading branch information
hMatoba authored Oct 27, 2018
2 parents db2f80a + 3e536db commit 20dd6c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ Thank you for using piexifjs!
How to Use
----------

- *var exifObj = piexif.load(jpegData)* - Get exif data as *object*. *jpegData* must be a *string* that starts with "\data:image/jpeg;base64,"(DataURL), "\\xff\\xd8", or "Exif".
- *var exifStr = piexif.dump(exifObj)* - Get exif as *string* to insert into JPEG.
- *piexif.insert(exifStr, jpegData)* - Insert exif into JPEG. If *jpegData* is DataURL, returns JPEG as DataURL. Else if *jpegData* is binary as *string*, returns JPEG as binary as *string*.
- *piexif.remove(jpegData)* - Remove exif from JPEG. If *jpegData* is DataURL, returns JPEG as DataURL. Else if *jpegData* is binary as *string*, returns JPEG as binary as *string*.
- :code:`var exifObj = piexif.load(jpegData)` - Get exif data as *object*. *jpegData* must be a *string* that starts with "\data:image/jpeg;base64,"(DataURL), "\\xff\\xd8", or "Exif".
- :code:`var exifStr = piexif.dump(exifObj)` - Get exif as *string* to insert into JPEG.
- :code:`piexif.insert(exifStr, jpegData)` - Insert exif into JPEG. If *jpegData* is DataURL, returns JPEG as DataURL. Else if *jpegData* is binary as *string*, returns JPEG as binary as *string*.
- :code:`piexif.remove(jpegData)` - Remove exif from JPEG. If *jpegData* is DataURL, returns JPEG as DataURL. Else if *jpegData* is binary as *string*, returns JPEG as binary as *string*.

Use with File API or Canvas API.

Example
-------

::
.. code:: html

<input type="file" id="files" />
<script src="/js/piexif.js" />
Expand Down

0 comments on commit 20dd6c4

Please sign in to comment.