*first sorry for weak English*

*in code *

*im get image from url *
*save like that*
#load image in skimage libray
img = io.imread(poster)
#to edit image opencv convert colors to rgb
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
#now load logo
logo = cv2.imread("static/assets/logo_o.jpg")
h_img, w_img, _ = img.shape
h_logo, w_logo, _ = logo.shape
center_y = int(h_img / 2)
center_x = int(w_img / 2)
top_y = center_y - int(h_logo / 2)
left_x = center_x - int(w_logo / 2)
bottom_y = top_y + h_logo
right_x = left_x + w_logo
roi = img[top_y: bottom_y, left_x: right_x]
# Add the Logo to the Roi
result = cv2.addWeighted(roi, 1, logo, 0.3, 0)
# Replace the ROI on the image
img[top_y: bottom_y, left_x: right_x] = result
# Get filename and save the image
cv2.imwrite(f"media/movie_poster/{save_file_name}_preview.jpg", img)



*but now i try to use aws s3 how i can upload image on aws please help*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANYMdQ%2Bt6HwMwGdC4NzO25adepaPdmoD_OujWx10ZYn6SR48Lg%40mail.gmail.com.

Reply via email to