|
They aren't the available sizes, but the actual size of each photo, so
each photo could have different dimensions, depending on whether or not
the user cropped it in Photoshop, the size the camera produces, etc.
It's random data that's more or less unique to each photo. The SIZE1,
SIZE2, etc. have within them the maximums; for example, SIZE1 might be
200 maximum width and height, SIZE4 could be 1024. Those are hard
coded in the enum (but I could store them elsewhere): public enum PhotoSizeBounds { SIZE0(0), // original photo SIZE1(200), SIZE2(320), SIZE3(640), SIZE4(1024); private final int max; PhotoSizeBounds(final int _max) { max = _max; } /** * @return the maximum for this size. */ public int getMax() { return (max); } } So when I display a picture at its SIZE1 size, I want its width and height because this is for a web app and I need those 2 values for the IMG tag. Ole Trenner wrote: (sorry if this message is a duplicate) Rusty Wright wrote:I'm trying to figure out how to set up storing a Map of pairs of numbers. I have a Photo object, and it has a Map of the different sizes in which the Photo is stored on disk. The map keys are SIZE1, SIZE2, and SIZE3 (an enum; the map is an EnumMap). The values in the Map are a simple object, ImageSize, with width and height fields. Each photo has its own sizes; no relationships and the widths and heights are essentially random values. |
- best way to use a Map? Rusty Wright
- Re: best way to use a Map? Ole Trenner
- Re: best way to use a Map? Rusty Wright
- Re: best way to use a Map? Brandon Goodin
- Re: best way to use a Map? Rusty Wright
