i want to display the some part of image.like a comic book.i have one image like this.
when i click on image some part display like this.
i want to display this type. in this process i create some zip file witch contain the part of images of main image. i done to display every image sequence wise.but my problem is how to get the actual image's any part click and display this in like second screen?
i can't get the image part id. so how to get this part of image id.
so please help me. i am stuck.
If you have archive with parts of main image, so that means you made them manually, right? So, your comics book viewer will be applicable only for manually created content.
It it's true, so there is no trouble to make some kind of config-file (for example xml-based or Properties file) which will contain size and position for each part.
After that you can handle MotionEvent and detect id of part by coordinates from config.
You also can improve your application by cutting images on-fly. It's not difficult.
Example:
Your image here (page1.png
):
--------------------------------
| | |
| | |
| | 2 |
| 1 | |
| | |
| |------------|
| | |
|-----------------| |
| | 4 |
| | |
| | |
| |------------|
| 3 | |
| | |
| | 5 |
| | |
| | |
--------------------------------
Your simple config (page1.cfg
):
# Parts description
# id=x,y;w,h
1=0,0;18,9
2=19,0;13,7
3=0,10;18,11
4=19,8;13,7
5=19,15;13,6
Your zip:
page1.png
page1-1.png
page1-2.png
page1-3.png
page1-4.png
page1-5.png
page1.cfg
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With