#30659 - 01/15/10 07:54 AM
How can I map a picture?
|
Anonymous
Unregistered
|
I have a picture and I need show only a part of the picture, but I don't know how to do it, when I put the picture in Design, it's show all picture.
I need cut it.
For example I have a picture 100x100, I need show only 10x10 of this picture. Not resize, but cut and show 10x10 of the all picture.
Thanks...
|
Top
|
|
|
|
#30660 - 01/15/10 09:43 AM
Re: How can I map a picture?
|
OL Expert
Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
|
Rodrigo, You will need to create a new PressTalk object, and use a code like this one: moveto(0,0)
rlineto(1.0, 0)
rlineto(0, 1.0)
rlineto(-1.0, 0)
rlineto(0, -1.0)
closepath()
clippath()
moveto(0,0)
showbitmap('C:\\images\\kitty.bmp',0,&width,&height) The first step is to define a clipped path. It is done by using rlineto commands. In this case, it starts from the top left corner of the box, and creates a square clipped path that has a size of 1 inch by 1 inch. Then we use closepath and clippath to create the clipped region. Then, we move back to the top left corner, and display the image we want. The result is that it will only fill the clipped path box with a part of the picture, and leave the rest blank. Hope that helps! Regards, Rapha
|
Top
|
|
|
|
#30661 - 01/15/10 10:29 AM
Re: How can I map a picture?
|
Anonymous
Unregistered
|
Hi,
While Raphael's solution is perfectly right, with PlanetPress Design version 7 the settings to display a clipped region have been integrated into a picture object's properties.
To try it:
1. Place a picture on a page of your PlanetPress Design document.
2. Double click on this picture object to display its properties, and locate the settings tab.
3. Check the 'Clipped region' checkbox and write in the appropriate left, top, width and height values for the clipping rectangle.
Hope this helps!
Benoit
|
Top
|
|
|
|
#30662 - 01/18/10 05:39 AM
Re: How can I map a picture?
|
Anonymous
Unregistered
|
ok, but how can I use it randomize, the position can't repeat, I have 1 picture and need map it 10 times in a page in different positin randomize. I'm using the random(), but it's not working, because I don't know how to use, all tutorial I have don't teach it.
|
Top
|
|
|
|
#30663 - 01/18/10 05:16 PM
Re: How can I map a picture?
|
Anonymous
Unregistered
|
Hi, Not sure if I understand correctly what you are trying to accomplish... For each datapage, you want to display a page with 10 different clipped regions of the same picture, with random values for the left, top, width and height of each clipped region?
|
Top
|
|
|
|
#30664 - 01/19/10 09:40 AM
Re: How can I map a picture?
|
OL Expert
Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
|
Rodrigo, Not sure what you're trying to accomplish either, you might want to give us a bit more details. I can tell you, however, how random() works. Basically, random() returns a number between 0 and 1, non-inclusive. So if you want a number from 1 to 10, for example, you could use: define(&i, integer, 0)
&i := floattoint((10 * random())) + 1 In your case, you'll want to use measure values for the positioning, so you won't need "floattoint". You could type something like this in one of the position coordinates: This would return a position from about 0 to about 8.5. You can use the same logic for other position values. Regards, Rapha
|
Top
|
|
|
|
#30665 - 01/19/10 11:42 AM
Re: How can I map a picture?
|
Anonymous
Unregistered
|
thanks all for the help. I'll say what I did. I used a software called ImageMagic to crop the Image. After it I did a VBScript to do a random a crop. Then in the Design I just call the pictures.
But now I have a new problem. Yesterday night I discover that I need two mass data to prepare the application. I know that PP7 have this action, but I don't find it. Some one knows how to do it??
|
Top
|
|
|
|
|
|