Or you could draw both images (bitmapA and bitmapB loaded from the 2
original jpegs)  onto a canvas that is backed by another empty bitmap
(bitmapC). Then you call compress(...) on bitmapC to save it to a
jpeg.

Both Justin's and my method will have some image degradation,
depending on how you save the final bitmap back to disk. If you save
the final one (bitmapC) as JPEG, even when you set quality-level to
100, you will get some degradation of image quality. Saving it as PNG
may circumvent this.

But you still need to figure out *how* to combine the two. :-)

On Sep 24, 3:12 pm, "Justin (Google Employee)" <j...@google.com>
wrote:
> The general algorithm would be to load both images into Bitmaps, then
> get the pixels of each Bitmap. Determine the image size you need to
> combine the two and create a new Bitmap with these dimensions. Then
> use setPixels to write the combined image into the Bitmap object and
> finally write the combined image back to disk.
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Sep 24, 7:40 am, Streets Of Boston <flyingdutc...@gmail.com> wrote:
>
>
>
> > What is 'append'?
>
> > Two images stitched together? One on the right, the other on the left?
> > Or one above the other?
> > Or one merged inside the other (overlay)
> > What if they are of different size?
>
> > You have to be more specific about what you ask :)
>
> > On Sep 24, 4:51 am, Isuru danagalle <iisuru....@gmail.com> wrote:
>
> > > Hi All,
> > >      Anybody tried to append 2 jpeg files in android?
> > > i.e: a.jpeg and b.jpeg sd be appended and sd give one c.jpeg image file
> > > consist of both images.
>
> > > Any idea?
>
> > > Thanks
> > > Isuru- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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