Jpg Mosaic and BMP issue

  • Thread starter Thread starter DanWeaver
  • Start date Start date
D

DanWeaver

I have been struggling all day with the following:

I am trying to mosaic numerous georeferenced jpgs (so that I can
reduce the size of the whole lot together lessening edge defects other
than those at the extremes of the mosaic and getting a better quality
reduction). When I add a jpg image to a new (large) image OF TYPE
Bitmap the resulting output image is no-good, see:

http://danofweaver.googlepages.com/development

It looks like an array type (count -1 --arghh!) problem but each of
those tiles when stepping through the code is a 2000 x 2000 image and
being placed in the new image at (0,0) , (0,2000) and (0,4000)
respectively, so I think its an image compatibility problem. Should I
set up and draw to a new jpg (the output is fine as a jpg)? If so how
is this done? What is causing the problem?
I have placed another test result on the page linked to above - that
of a 100x140 jpg placed to 0,0 and in GIMP the coordinate of the
bottom right of Bill is about 133,188? what is the deal?

Any thoughts gratefully received- I'm unsure which code is germane but
here are a few bits...

Dim Mosaic As Bitmap
Mosaic = New Bitmap(2000,6000)

Dim MosaicGraphics As Graphics
MosaicGraphics = Graphics.FromImage(Mosaic)
:
animage = Image.FromFile(AllImages(Ximage, Yimage)) ' path to a JPG
MosaicGraphics.DrawImage(animage, startpoint)
 
I haven't tried it, but I guess it would be something like:

Dim Rect As New Rectangle(StartPoint.X, StartPoint.Y, 2000,2000)
MosaicGraphics.DrawImage(animage, Rect)
 
Back
Top