Highlighted
Absent Member.
Absent Member.
1958 views

[archive] Bitmap Scale

[Migrated content. Thread originally posted on 26 October 2009]

Hello,

I looked up for some tips here in the forums, but i see no one have posted something about this new feature in v8. That make me think that or all is working as intended and no one have problems or maybe no one use it :confused:. But, i have some problems with it:

1 - The scaled property doen't show in the acubench gui, and i tried to put it on "aditional properties" but nothing happens (in the help, i see that must be defined this property before bitmap-handle, maybe that's the tip)
2 - I try to set up on run time, not design time, but nothing:

ACCEPT ACU-BITMAPPATH FROM ENVIRONMENT "Bitmap-Path"
ON EXCEPTION
MOVE "dibujo.bmp" TO ACU-FULLBITMAPPATH
NOT ON EXCEPTION
INITIALIZE ACU-FULLBITMAPPATH
INSPECT ACU-BITMAPPATH REPLACING TRAILING SPACE BY "\"
INSPECT ACU-BITMAPPATH REPLACING TRAILING "\" BY LOW-VALUE
STRING ACU-BITMAPPATH DELIMITED BY LOW-VALUE
"\" DELIMITED BY SIZE
"dibujo.bmp" DELIMITED BY LOW-VALUE
INTO ACU-FULLBITMAPPATH
END-ACCEPT
CALL "W$BITMAP" USING WBITMAP-LOAD ACU-FULLBITMAPPATH,
GIVING apertura-bmp
END-CALL

display bitmap
bitmap-scale 1,
BITMAP-HANDLE apertura-bmp,
size 120 pixels,
lines 80 pixels,
col 30,
line 20,
handle in bt-1

If i comment the bitmap-scale 1 sentence, the image shows. It's a 24 bits color bitmap, like the help says.

Actually i have no point. Any ideas?

Thanks afterwards
0 Likes
6 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Bitmap Scale

Just a clip out of the doc that might apply:

Currently, only 24-bit colors are supported. If your bitmap is not 24 bit, you can use Microsoft paint to store the bitmap as 24 bit.
We recommend that jpeg files be used whenever possible, as they appear to give the best resizing capability.



Hope This Helps...
-Chris
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Bitmap Scale

Your code does not show that you display a graphical window, I presume you do this?

I notice that you display the bitmap control direct. Have you tried to display the control as
a member of a screen section?

It would be easier to check this if you could provide a full sample program (minimal size of course).

Have you checked the value of the handle (apertura-bmp) returned from w$bitmap?

Btw, you do not have to use NULL termination on parameters library routines.

Can you tell me how apertura-bmp is defined?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Bitmap Scale

If i comment the bitmap-scale 1 sentence, the image shows. It's a 24 bits color bitmap, like the help says.


Yeah, i'm using a 24 bits bitmap like i said.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Bitmap Scale

Yeah, i'm using a graphical screen, if i comment in the manual display the bitmap-scale property all works well, the image is loaded correctly, etc etc.

77 Apertura-bmp usage is handle of bitmap.

And i'm using a manual display beacuse we set that acubench generates our screen section automatically. I'll try to reproduce in a program.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Bitmap Scale

My apologize, was an idiot mistake, all the code is correct but i was executing the program in 7.2 compatibility
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Bitmap Scale

🙂

Been there, done that.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.