Click here to Skip to main content
15,914,820 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionHow to shift a bitmap efficiently (Spectrogram Application) [modified] Pin
bimbambumbum19-Sep-10 13:53
bimbambumbum19-Sep-10 13:53 
Hi
I'm working on a Spectrum analyzer application and need some help to get the graphics updated in an optimal manner.

Whenever my program receives a new block of audio data I do an FFT and I then update the oldest FFT data (a column) in my 2D-matrix which is then copied to a bitmap for display. So this spectrogram is shifted horizontally as data arrives in blocks. I see two options for achieving the shifting of the NxM bitmap whenever a new FFT output block arrives:

1. Copy columns [0:M-2] to [1:M-1] and then copy in the new FFT data...hope the notation makes sense. This requires a lot of memory copying and I hope to avoid that using GDI.

2. Replace the "oldest" column (the matrix works as a circular buffer in the time-direction) and let GDI ensure that when wrap-around happens GDI the remaining columns (the columns up to the column where the new FFT data resides) are copied to the bitmap. I once did a spectrum Analyzer in C++ project using OpenGL that supports this functionality. Can find the project anymore..I tried to look for it to find the name of the instruction used. Does GDI/GDI+ support this?

Do any of you guys know how I get to do this efficiently?

Thx
Tom

modified on Sunday, September 19, 2010 8:00 PM

AnswerRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
Luc Pattyn19-Sep-10 15:43
sitebuilderLuc Pattyn19-Sep-10 15:43 
GeneralRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
bimbambumbum19-Sep-10 16:55
bimbambumbum19-Sep-10 16:55 
GeneralRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
Luc Pattyn19-Sep-10 17:11
sitebuilderLuc Pattyn19-Sep-10 17:11 
GeneralRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
bimbambumbum19-Sep-10 17:32
bimbambumbum19-Sep-10 17:32 
AnswerRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
Luc Pattyn19-Sep-10 17:48
sitebuilderLuc Pattyn19-Sep-10 17:48 
GeneralRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
bimbambumbum19-Sep-10 17:57
bimbambumbum19-Sep-10 17:57 
AnswerRe: How to shift a bitmap efficiently (day 2) [modified] Pin
Luc Pattyn20-Sep-10 16:14
sitebuilderLuc Pattyn20-Sep-10 16:14 
GeneralRe: How to shift a bitmap efficiently (day 2) [modified] Pin
bimbambumbum20-Sep-10 17:54
bimbambumbum20-Sep-10 17:54 
GeneralRe: How to shift a bitmap efficiently (day 2) Pin
Luc Pattyn20-Sep-10 18:09
sitebuilderLuc Pattyn20-Sep-10 18:09 
GeneralRe: How to shift a bitmap efficiently (day 2) Pin
bimbambumbum21-Sep-10 11:23
bimbambumbum21-Sep-10 11:23 
GeneralRe: How to shift a bitmap efficiently (day 2) [modified] Pin
Luc Pattyn21-Sep-10 11:41
sitebuilderLuc Pattyn21-Sep-10 11:41 
GeneralRe: How to shift a bitmap efficiently (day 2) Pin
bimbambumbum21-Sep-10 11:45
bimbambumbum21-Sep-10 11:45 
AnswerRe: How to shift a bitmap efficiently (day 2) Pin
Luc Pattyn20-Sep-10 18:29
sitebuilderLuc Pattyn20-Sep-10 18:29 
GeneralRe: How to shift a bitmap efficiently (day 2) Pin
bimbambumbum22-Sep-10 13:01
bimbambumbum22-Sep-10 13:01 
GeneralRe: How to shift a bitmap efficiently (day 3) Pin
Luc Pattyn22-Sep-10 13:06
sitebuilderLuc Pattyn22-Sep-10 13:06 
QuestionDataBinding-aware (dependency)objects? Pin
Don Rolando19-Sep-10 3:32
Don Rolando19-Sep-10 3:32 
Questionpicturebox.visible problem Pin
bimbambumbum18-Sep-10 15:36
bimbambumbum18-Sep-10 15:36 
AnswerRe: picturebox.visible problem Pin
bimbambumbum18-Sep-10 15:42
bimbambumbum18-Sep-10 15:42 
GeneralRe: picturebox.visible problem Pin
DaveyM6918-Sep-10 20:29
professionalDaveyM6918-Sep-10 20:29 
AnswerRe: picturebox.visible problem Pin
Luc Pattyn19-Sep-10 3:44
sitebuilderLuc Pattyn19-Sep-10 3:44 
QuestionChoice of .NET Framework version Pin
fdsfsa76f7sa615-Sep-10 21:31
fdsfsa76f7sa615-Sep-10 21:31 
AnswerRe: Choice of .NET Framework version Pin
Kubajzz16-Sep-10 0:16
Kubajzz16-Sep-10 0:16 
AnswerRe: Choice of .NET Framework version Pin
Pete O'Hanlon16-Sep-10 1:28
mvePete O'Hanlon16-Sep-10 1:28 
AnswerRe: Choice of .NET Framework version Pin
The Man from U.N.C.L.E.20-Sep-10 12:06
The Man from U.N.C.L.E.20-Sep-10 12:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.