Page 1 of 1

know the handler the image

Posted: Mon Apr 16, 2007 4:12 pm
by sinita
Hi, sorry my bad english.
How I can to know the position in memory temporal after ImagePNG($image) and before ImageDestroy($image)?
Thanks a lot
:oops: :?

Posted: Mon Apr 16, 2007 4:51 pm
by feyd
What?

Posted: Tue Apr 17, 2007 3:30 am
by onion2k
If I understand you correctly the answer is that you can't using plain PHP. There's no low level memory addressing functions. You could write an extension in C or something that could query the address of a handle, but I think handles are just strings that act a bit like pointers anyway, so you'd need to lookup the real address in PHP's address table. It'd be very tricky.

Why do you need to do this anyway? The only thing I can think of would be that you're trying to access the memory area using some sort of external application. I wouldn't go there if I were you. It's asking for trouble.

Posted: Tue Apr 17, 2007 8:11 am
by sinita
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


OK...I'm trying to print a report with TCPDF, I need to show an image but within save it. Something like this:

Code: Select all

<?php

$image = imagecreate(300,60);

...

ImagePNG($image);

//In this point i need to get the handler of that image in order to pass it to $pdf->GDImage($image, 50, 25, 40); 

ImageDestroy($image);

?>
I hope you can help me

Thanks


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]