how to add a small image into a large image
See original GitHub issue@jcupitt Hi, I have such python code below and I wanna rewrite it with pyvips. What should I do?
import numpy as np
start_point_x, start_point_y = 500, 500
small_one = np.ones((2048, 2448, 3), np.uint8)
s_h, s_w, s_c = small_one.shape
big_one = np.zeros((10000, 10000, 3), np.uint8)
big_one[start_point_y: start_point_y+s_h, start_point_x: start_point_x+s_w, :] = small_one
print(np.sum(big_one), np.sum(small_one))
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
How to Enlarge a Photo for Printing Without Losing Quality
Open your image in Photoshop. · Go to the Image Size dialog, check resample, and select "Preserve Details" in the corresponding dropdown menu....
Read more >How to Resize and Make Images Larger without Losing Quality
Open the file in Photshop, click on “image size, un-check “Resample image”, then start adjusting the pixel size under width until you reach...
Read more >How to Make Images Larger Without Losing Quality: Real Tests!
Learn to resize and make images larger without losing quality with the best tools for the job. We compare each enlarger with vigorous...
Read more >How to Resize an Image - All About Images - Research Guides
1. With Photoshop open, go to File > Open and select an image · 2. Go to Image > Image Size · 3....
Read more >How to Resize Images for Print with Photoshop
To resize an image for print, open the Image Size dialog box (Image > Image Size) and start by turning the Resample option...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found a horrible problem in 2.1.6 – some internal tables could grow exponentially in some cases.
I’ve fixed it, and your code should run quickly now. Thanks!
Thanks very much! version 2.1.7 worked!