On Fri, Apr 20, 2012 at 06:27:18AM -0700, Streets Of Boston wrote:
> Note that createScaledBitmap may return the same bitmap as the input... 
> when the input parameters *width *and *height *are the same as the 
> width/height of your input bitmap:
> 
> Change the code as follows (bold part is the changed part):
> 
> Bitmap bmp1 = Bitmap.createScaledBitmap(src, width, height, false); 
> *if (bmp1 != src) {*
>    src.recycle(); src = null;
> *}*
> 
> Do a similar thing for bmp2 and dst.

Except for one minor detail you missed:  those are examples that WERE
problems, before I changed the location where I was setting the size
of the bitmaps for the end of the app (moved that to the end), and
both bmp1 and bmp2 no longer exist.  :-)

> I'm a photographer as well (not professional, though)  :)

I'm not a pro, either, but I was taught by one while I was in 16SOW
Intelligence (he was a professional before cross-training into Intel).
I learned a lot.  :-)   I learned about Ektar, however, somewhere around
1990, with the old non-pro Ektar line, and when I found out that my old
favorite, Ektar 125, was now Ektar Pro 100, I had my favorite film back.
:-)

> Using RGB_565 is ok for most purposes. The camera quality of most phones 
> are not up to snuff yet to really warrant a 8-bit color space. However, 
> camera quality of some devices is starting to catch up.

True on both.  But don't forget tablets and the newer phones running ICS.
Better cameras are, as you say, increasing in number with newer,
higher-quality devices.

I'm not building this for the past...I'm building it with an eye toward
the future, and MY tablet (Acer Iconia A500 ... should get ICS sometime
starting around the end of next week) is only 5 MP, but it has great
color.

Besides, I KNOW I saw an old post from someone who described saving
chunks of the file to files (not jpeg, just raw data) and then, I think
it was in another process spawned by the app, processing and saving the
huge image.  I'd do the same for the image, recycle it, then create,
split, and save the chunks of the filter...then process in the other
process, keeping only the main image and one tiny chunk at a time in
memory, and finally, save it from the second process.

I don't know how to DO that yet, but I will.  Throughout this entire
app, the fact that I haven't known how to do something hasn't stopped
me yet (and I've made big progress blasting through those would-be
blockades), and it's not going to now.  (As I mentioned in another
post, I've learned many times more working on this app than all of
my other apps combined, and that pace hasn't slowed down yet, and
I don't mind that a bit.)

> But for now, people taking pics with their phones would need no better
> than RGB_565 processing.

True.  But then, I draw a definite line between "taking pictures" and
"photography".  And, like I would imagine most photography hobbiests/pros
do, I do both.  So I'm making this app for both (but I'm keeping the
great color).  You can adjust the image size to anything your device's
camera will support (and I'm assuming that the device will have adequate
memory to process photos from that camera, given android:largeHeap="true"
set in the manifest and Android 3.0+).  But if not, it'll soon be smart
enough to detect that, and re-size automatically as needed.  But it
won't happen today.  My brain is already screaming at me as it is.  Any
more time doing much of anything, it'll be an all-out Migraine, and I'll
lose several days, at a minimum (as always, cancer #1, blah blah blah).

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)            MiSTie #49997      < Running FreeBSD 7.0 >
spooky1...@gmail.com                    ICBM/Hurr.: 30.44406N 86.59909W

          "The iPad is a status symbol for yuppies. The Android
         is for people who actually want something that works."

Android Apps Listing at http://www.jstrack.org/barcodes.html

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to