Create thumbnail and output to browser - from a function - (avoid creating file) |
[eluser]CARP[/eluser]
Hi I have a function that receives a parameter $file=path+filename and should return the image thumbnail of that file Code: function thumb($file){ This function is called in a foreach loop from a view file. The problem is that it is not returning anything, nor errors, but I guess it is because I should use the header function, right? But: how? Thanks a lot in advance
[eluser]d1a8lo24[/eluser]
See the following thread and look at the code i posted hope it helps you out http://ellislab.com/forums/viewthread/188264/P15/
[eluser]CARP[/eluser]
Hi d1a8lo24 I tried your code, but didn't work. It seems it need a file located in disk, but I need to create the thumbnail without saving it to disk, and return this thumbnail back to the view. Thanks,
[eluser]William Rufino[/eluser]
you have to echo the content of the image with the correct mime type...
[eluser]CARP[/eluser]
[quote author="William Rufino" date="1305912042"]you have to echo the content of the image with the correct mime type...[/quote] could you give me a hand->example? thanks |
Welcome Guest, Not a member yet? Register Sign In |