Where I can find a image hook type list

Rafael [redcrested.net] Posted in Component Development 2 years ago

Hi

I look into reduceimagesize component to make a new component to put site logo into uploaded photo. I see the command ossnaddhook('ossn', 'image:resize:quality', 'reduceimagessize'); and looking into references I couldn't find $type list. Where I can find all $type list?

Regards!

Replies
Indonesian Arsalan Shah Replied 2 years ago

There is no hook right now where you can change the types of pictures which you only want to get resized. The hook you refer only set integer number and it have no other option. https://github.com/opensource-socialnetwork/opensource-socialnetwork/blob/v6.x/libraries/ossn.lib.image.php#L53

You would require to modify the function yourself to adjust your types . I hope it clears that there is no hook right now to change types as it is for all images and you would need to modify the image library.

Breton Rafael [redcrested.net] Replied 2 years ago

@Arsalan

I'm referring to the second parameter of the "ossnaddhook" function, in this case 'image: resize: quality' I want a list of all $types, if any, to see where I can best insert the command I want

The idea is make a component, like reducesize, to put site logo into corner of user uploaded photo, just as watermark.

Regards