in frontend/src/app/asset-group-pmax/asset-group-pmax.component.ts [138:163]
generateImage() {
let obj = {
"prompt": "theme:" + this.selectedCampaignFromDropdown[0].data.theme + ",aspect_ration: " + this.aspectsRatio + ",color_tone:" + this.colorTone
+ ", lighting:" + this.lighting + ",compostion:" + this.compostion + ",content_type:" + this.ContentType,
"number_of_images": 3,
"negative_prompt": ""
}
this.assetGroupPmaxService.generateImages(obj).subscribe((res: any) => {
this.images = []
this.base64Images = []
this.imagesData = res.generated_images
res.generated_images.forEach((element: { images_base64_string: string; }) => {
this.emailCopy = this.domSanitizer.bypassSecurityTrustResourceUrl('data:image/jpg;base64,'
+ element.images_base64_string);
this.images.push(this.emailCopy);
this.showProgress = false;
this.showImageGenarateBtn = true
});
res.generated_images.forEach((element: { images_base64_string: string; }) => {
this.base64Images.push(element.images_base64_string);
});
});
}