Texture resizing Urgent :(

Hello there, I need to resize a JPEG (loaded as texture) with CUDA.
Is a 5 Mpixel image so it won’t be a huge texture…
Anyway is urgent and extremely important and I not have so much time to read DOCs…

Texture A: JPEG 2500x1600 < OK >
Texture B: JPEG 640x480 < how? >

this is what I want to do with CUDA.

I’m googling since 3 hours but I didn’t found anything interesting about that…can somebody help me please?

Thanks in advance. :)

You’ll need to spend time reading docs, there’s no way around it.

One possibility–use the built-in CUDA linear filtering of textures and maybe do a couple rounds. First round, sample in the middle of the 4 surrounding points of the source texture. This would give you a linearly filtered 1250x800 image. Do the same thing one more time to get a 625x400 image.

If you want something more sophisticated than linear filtering, or this simple divide-by-two algorithm, you’ll probably not be able to take advantage of the hardware texture filtering.

If you definitely don’t have time to read docs, and you want to contract out this kind of work, I’m sure there are plenty of people who can help. (Including myself). Be prepared to pay ~$100/hr.

You can use hardware filtering going immediately from the original to the required image, there is no need to do a divide by 2 at all. But it does throw away information that could be preserved when doing some more fancy filtering using more than the nearest neighbors.

I would not have answered this post normally. One tip: do not say you are not willing to read the docs, it will minimize the amount of reactions on your post. You will also not be able to make it work without reading the docs is my experience (FWIW)…

Lanczos scaling isn’t too hard to implement on CUDA, but you WILL have to read some docs. I have an implementation that I may release as open-source, but I honestly just cannot release it right now.

For a super-simple solution, I advise you to use ImageMagick to resize on the host side, if you can. That will get you up and running in the least amount of time.