How to mofify an image with V.Fortran

How to mofify an image with V.Fortran

I want to modify a jpeg (or gimp, or bmp) image by addition of a transparent layer.
Image is done by n*m pix.
Layer is known as a n*m matrix of coefficients computed with Fortran (Compaq).
(It is possible to view matrix with Compaq Array Visualizer)
I need to put "matrix view" over the image to high light results on the original map, and I must save image modified.
Is someone know how to do this?
Thankyou

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You may take a look at my XFTGDI Module. (Make sure to download the documentation too). It could simplify the task, but currently it cannot load/save jpeg (only a bmp), and it doesn't have direct mechanism for creating a bitmap from matrix other than XSetPixel. The code could look along these lines:

USE XFTGDI
...
TYPE(X_DC):: xDC
TYPE(X_BITMAP):: xBmp
...
xDC = XMemoryDC(200,200)
!You can call XSetPixel, XLine, XRectangle, 
!XPlaceBitmap etc. to modify the image:
DO iX = 1,200
   DO iY = 1,200
      i = XSetPixel(xDC, iX, iY, someColor)
   END DO
END DO
i = XGetBitmap(xDC, xBmp, 0, 0, 200, 200)
i = XSaveBitmap(xBmp, "MyBitmap.bmp")
i = XDeleteBitmap(xBmp)
i = XDeleteDC(xDC)

Jugoslav

Jugoslav
www.xeffort.com

Leave a Comment

Please sign in to add a comment. Not a member? Join today