Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
slruslan committed Sep 15, 2015
1 parent 4739cb9 commit 3c781af
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
![PHP Waveform2PNG Library](examples/bars_example.png)
PHP Waveform2PNG Library
===

Expand Down Expand Up @@ -32,10 +33,15 @@ Original code by [Andrew Freiday](http://andrewfreiday.com).
- Change the settings (or leave them default):
> $graph->setHeight(200);
>
> $graph->setWidth(1200);
>
> $graph->setBackground('');
>
> $graph->setForeground('#35cc32');
>
> $graph->setDetail(20);
>
> $graph->setType('waveform');
- Load your file and process it:
Expand All @@ -46,6 +52,16 @@ Original code by [Andrew Freiday](http://andrewfreiday.com).
> $graph->saveImage('waveform_example.png'); // Saves image to file
> $graph->outputImage(); // Outputs image to browser
### Available graph types

##### Waveform:

![Waveform graph](examples/waveform_example.png)

##### Bars:

![Bars graph](examples/bars_example.png)

### Image generation options

Main settings are specified with methods
Expand All @@ -57,23 +73,16 @@ Main settings are specified with methods
- setDefail($amount) - Sets detalization level to $amount. (The lower the number, the less data points are skipped, thus resulting in higher detail waveform);
- setType($type) - Sets graph type to $type;


### Multicolor graph

There is also a method to create graph with different color regions:

- addColor($timeMin, $timeMax, $color) - Sets color of graph to $color on region from $timeMin to $timeMax secs. Example:

![Multicolor graph](examples/multicolor_example.png)


### Available graph types

##### Waveform:

![Waveform graph](examples/waveform_example.png)

##### Bars:

![Bars graph](examples/bars_example.png)

### Other notes

Library is currently under development.
Expand All @@ -82,4 +91,4 @@ Feel free to submit your suggestions and use issue tracker if you've found a bug

### License

Please see the LICENSE file.
Please see the LICENSE file.

0 comments on commit 3c781af

Please sign in to comment.