This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10535 - Simple BMP Viewer
Attached to Project:
Rockbox
Opened by Michael Ignatiev (megamike) - Monday, 17 August 2009, 17:13 GMT+1
Last edited by Teruaki Kawashima (teru) - Thursday, 18 February 2010, 16:27 GMT+1
Opened by Michael Ignatiev (megamike) - Monday, 17 August 2009, 17:13 GMT+1
Last edited by Teruaki Kawashima (teru) - Thursday, 18 February 2010, 16:27 GMT+1
|
DetailsThis plugin is standart simple BMP viewer.
This patch enable view BMP-files on Rockbox as know file type You have put bmpview.c and bmpview.h in apps/plugins/ directory |
This task depends upon
Closed by Teruaki Kawashima (teru)
Thursday, 18 February 2010, 16:27 GMT+1
Reason for closing: Accepted
Additional comments about closing: in r24754.
Thursday, 18 February 2010, 16:27 GMT+1
Reason for closing: Accepted
Additional comments about closing: in r24754.
If you don't know how to add a file to svn: svn add <file>
Here it is:
Try last version of my patch - v.1.1.
Try last version of my patch - v.1.1.
Rockbox policy requires you to put your full name there though, see http://svn.rockbox.org/viewvc.cgi/trunk/docs/CONTRIBUTING?view=raw .
Other than that, I don't see anything wrong (haven't actually tested your patch though).
edit:
small nitpick: you used // comments instead of /* */ comments in some places
Please move the contents of the .h file into the .c file to be more in line with the other single file plugins.
There are some very long lines i your code, our guidelines state a maximum of ~80 chars.
It doesn't compile for ipod video for example as it has no BUTTON_POWER, you can look at other plugins to see how they have managed keymaps for different targets.
The hunk in filetree.c should not be needed, instead please add a line for bmpview to viewers.config (I see that as it is now this will not work but i think dropping bmp from the builtin filetypes is better than this special case.
Quite a few images triggered a " Bitmap too large for buffer" ...
Please do not include commented out lines of code unless they have some special meaning or are otherwise motivated.
Some suggestions too, while i'm at it.
Clearing the backdrop and using a plain coloured background would look much better i think.
Centering small images would also look nicer on large displays.
Here is new version of my bmp_viewer:
1. Centering of small images
2. Full LCD-size of resized big images
That way audio doesn't get paused when you view (small) BMP images.
Also I spotted some typos like ", Could not load %s" -> "Could not load %s", "Error: No parametrs."->"Error: No parameters.", Impementation -> Implementation and cb_progess -> cb_progress.
I have tried to consider all your remarks as much as possible and even have added a 2x zoom.
It is the following version of my plugin:
I haven't tested much.
I would like to call your attention to the task
FS#6321, which has got the purpose to merge the image viewers.The advantage would be that the user can make a slideshow about different image formats and we avoid dublicate code.
For the second issue, it is intended behaviour that you can't zoom to actual size of image for too big image.
Such image is resized to the size to fit memory while loading image. other wise you can't view the image at all.
If you stop audio before use bmpviewer, you will be able to veiw the image in larger size.
If you are sure that the image can be opened without resizing, please report detail, the size of image (width, height, and maybe depth) and target/simulator you use.
you know that merging these plugins to one plugin cannot be done easily because available size of memory is limited.
Now this would also work on mono target, at least on simulator. not tested on a real device. but i don't actualy know how it works...
>Such image is resized to the size to fit memory while loading image. other wise you can't view the image at all.
Ok thanks for the information. I'm quite impressed with bmpviewer, it displays an image which has a size of 2592x1944 and 14.4MB. (Fuze, Simulator)
>you know that merging these plugins to one plugin cannot be done easily because available size of memory is limited.
I saw that you also wrote patches for the other image viewers, so I just wanted to draw your attention to it.
* use imageviewer.