|
|
Rockbox mail archiveSubject: Re: Images in WPSRe: Images in WPS
From: Daniel Stenberg <daniel_at_rockbox.org>
Date: 2005-06-09
On Thu, 9 Jun 2005, Tomas wrote:
> Please comment... and test... suggestions are welcome.
Nice work Tomas. I've only read the code, not tested it. Five things in random
1) I suggest you group the data for images within a single struct instead of
Currently you use:
int img_x[MAX_IMAGES];
While I instead prefer:
struct image {
struct image images[MAX_IMAGES];
2) strncpy(imgtmp, fmt+1, 1);
... could possibly be replaced to not use the copy and do:
n=isdigit((int)fmt[1])?fmt[1]-'0':0;
3) I don't particularly like the fixed image names, but I can live with them.
I would however prefer to have them loaded from a subdir in .rockbox, not
4) ret = read_bmp_file(imgtmp, &img_w[n], &img_h[n], img_buf, img_buf_free);
... this code seems to load every image to the same address 'img_buf' so
5) I have an idea regarding how to deal with multiple images and buffer use.
Read the image into a temporary buffer, then OR the image into a full
Then you have one single background-image to deal with in the WPS code.
-- Daniel Stenberg -- http://www.rockbox.org/ -- http://daniel.haxx.se/ _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockboxReceived on Thu Jun 9 20:11:44 2005 Page was last modified "Jan 10 2012" The Rockbox Crew |