Re: Working with images



On 14 mai, 13:27, Jan Wielemaker <j...@xxxxxxxxxxxxxxxxxxx> wrote:
On 2007-05-14, angelrap...@xxxxxxxxx <angelrap...@xxxxxxxxx> wrote:

Hi,

I´m using some images on a GUI, and have some problems. All images
have different sizes, and I´d like to create a figure object with a
fixed measurement, is it possible?.

The XPCE library contains the file scaledbitmap.pl, which allows for
scaling images.

And a second question, how can I change the showed image, I´ve tried
with send(img,resource(newimage)) but didn´t work.

send(Img, load, File). Maybe you want send(Bitmap, image, Image) and
have different image objects laying around for the Bitmap. Image is
just a collection of pixels that can be used in any number of bitmap
objects.

--- Jan

First of all, thank you for all the help you´re providing me. Acording
to scaled_bitmap library, once loaded I can use the scale, size
operations. I find it easier to use the size operation since each
image have a different resolution, so the scale will be different for
each one.

:- pce_global(@myimage, new(bitmap)).
.......
:-use_module(library(scaledbitmap)).

ver:-
.....
send(@myimage, image,resource(imagenum1)),
send(@myimage, size('100','100')),

But when I try this, I complains about the size arguments. I've also
tried with no success:

send(@myimage, size(100,100)),
send(@myimage, size,100,100),
send(@myimage, size, '100' , '100'),

.



Relevant Pages

  • Re: Print Preview colors
    ... Printing goes fine at every scale. ... // make compatible dc for bitmap selection ... interBM.CreateCompatibleBitmap;// final sizes ... // put the memory image into the main window DC ...
    (microsoft.public.vc.mfc)
  • Re: Working with images
    ... I´m using some images on a GUI, ... fixed measurement, is it possible?. ... have different image objects laying around for the Bitmap. ...
    (comp.lang.prolog)
  • Re: Did you know
    ... over bitmap formats if the number of information points are less than ... but you'd want three 'sizes' for vector icons. ... but it will still scale just fine. ...
    (comp.sys.mac.advocacy)
  • Re: Scale bitmaps using GDI+
    ... "Michael Phillips, Jr." ... In order to scale an indexed bitmap, ... The approach is the same but you use GDI instead of gdi+. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Scale bitmaps using GDI+
    ... You cannot instantiate a Graphics object from an indexed bitmap ... In order to scale an indexed bitmap, ... Use gdi+'s jpeg encoder to save your scaled bitmap. ...
    (microsoft.public.win32.programmer.gdi)