Fast screen drawing from memory bitmap source
Hello
I have got pixels (frames) coming out from frame grabber that I wanted to display so that I could get higher framerates than using standard method (about 5 fps):
i = createImage(new MemoryImageSource(width, height, pixels, 0, width));
g.drawImage(i,0,0,width,height,null);
Anyone knows a faster way to display memory bitmaps in Java?
cheers
Paul
Paul,
Here is hopefully a simple example of how to save some cpu time when drawing images. We will create a buffered image that is compatible with the screen and draw the original image on it.
BufferedImage imageToDrawOn; //going to be created
BufferedImage original; //allready loaded (use java.IO.read() )
imageToDrawOn = gc.createCompatibleImage(original.getWidth(),original.getHeight(),Transparency.BITMASK);
imageToDrawOn.getGraphics().drawImage(original,0,0, null);
//code
//example of how to display the image:
g.drawImage(imageToDrawOn, 0, 0, this);
I hope this helps!
~Matt
Similar Messages
-
How do I create a brush / line drawing from a photo source?
Working on converting photos into brush or line drawings for a printmaking project.
What tools do I use to do this?
I saved the photos in maximum qulaity with 600 pixels / inch.
I need to have them large enough to be enlarged to 16" x 24"
Any suggestions? Tried to find this here on the help site but couldn't find what I needed to help me.
Thanks muchly,
birgitta in Torontohere are some great video tutorials for you to reference:
enjoy,
janelle -
Why is draw table empty after i import from memory id 'SAP_APPLICATION' ?
Hello,
I have the following
data draw like draw.
data intdraz like draz occurs 0 with header line.
import draw
intdraz
from memory id 'SAP_APPICATION'
at this point draw table is empty and does not contain the information of the selected file, so basically
draw-DOKAR
draw-DOKNR
draw-DOKTL
draw-DOKVR
are all empty.
does anyone know why this is happening ?
thank youHi Rushikesh,
Dynamic table i have created with same structure as of internal table which is getting exported....
thats why i m surprised how come structure mismatch.....i have checked in debugger, structure is same.....for both the tables,
Can you/anyone give any example of Exporting internal table to MEMORY ID and getting it back (IMPORT) into dynamic internal table of same structure...
Regards
Munish Garg
Edited by: MunishGarg on Feb 16, 2010 11:36 AM -
second 6th generation nano..again with the same problem..screen is black will not turn on but am able to touch screen and get music/radio to play...able to touch around on screen from memory..nano is recognized in itunes and computer..but screen will not turn on..called customer support today..of course out of warranty but was told that it sounds like my backlight is burnt out and that's all i need fixed, told that it shouldn't be that expensive (live in myrtle beach SC) and that my screen is fine since i am able to touch around on it...any thoughts?
thanks to all for any advice or input..will try to take to local icitymac store in next couple of days
jennReplacing the backlight usually requires replacing the entire front LCD/digitizer. And yes, it sounds the backlight has burned out.
Keep in mind that if you go the Apple route, they won't actually repair the iPod, but instead will do an out of warranty exchange meaning your current Nano will be replaced with a refurbished model of the same capacity and generation.
B-rock -
Unable to switch screen mode from standard: PS CS5
Full screen with or without menus is grayed out in the view menu and the view dropdown selector from the menu bar. I have quit and re-entered PS and have reset all workspaces to default. I have checked that I'm working in 64 bit. I still cannot switch screen mode from standard. Last update was to 12.04. Last extension installed was photokit sharpener.
Thanks for any help. (PS, how do I reset preferences file on a mac?)
Cathy
Pertinent info:
Adobe Photoshop Version: 12.0.4 (12.0.4x20110407 [20110407.r.1265 2011/04/07:02:00:00 cutoff; r branch]) x64
Operating System: Mac OS 10.6.7
System architecture: Intel CPU Family:6, Model:37, Stepping:5 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2, HyperThreading
Physical processor count: 2
Logical processor count: 4
Processor speed: 3200 MHz
Built-in memory: 4096 MB
Free memory: 2353 MB
Memory available to Photoshop: 3698 MB
Memory used by Photoshop: 69 %
Image tile size: 128K
Image cache levels: 4
OpenGL Drawing: Enabled.
OpenGL Drawing Mode: Normal
OpenGL Allow Normal Mode: True.
OpenGL Allow Advanced Mode: False.
OpenGL Crash File: Not Detected.
OpenGL Allow Old GPUs: Not Detected.
OpenGL Version: 2.1 ATI-1.6.26
Video Card Vendor: ATI Technologies Inc.
Video Card Renderer: ATI Radeon HD 5670 OpenGL Engine
Display: 1
Main Display
Display Depth:= 32
Display Bounds:= top: 0, left: 0, bottom: 1080, right: 1920
Video Renderer ID: 16915203
Video Card Memory: 501 MBAhh, I knew it was probably something simple. No I didn't have a doc open since I was just working with prefs and trying to set desktop color. Banging my head now on my desk. Bam! So dumb ...
Thanks so much for solving my problem. -
I am not able to install screen-git from the aur
So yeah, i cant install screen-git from the aur. Im using yaourt.
┌─[yamifrankc]──(~)
└─| % > aur -S screen-git
==> Resuming previous build
==> Downloading screen-git PKGBUILD from AUR...
tar: Record size = 13 blocks
==> Last 5 comments ordered by date (asc):
Comment by: dolby on Tue, 16 Jun 2009 15:02:25 +0000
GNU screen shouldnt depend on libelf. Package in extra now doesnt.
See http://bugs.archlinux.org/task/14700
Comment by: dolby on Tue, 16 Jun 2009 15:03:08 +0000
Oh yeah, gpm isnt a dependency either.
Comment by: nihathrael on Tue, 16 Jun 2009 16:23:56 +0000
Thanks for the pointers. Package updated.
Comment by: firecat53 on Tue, 16 Jun 2009 23:19:28 +0000
At least for x86_64, libelf seems to be a dependency. Throws an error about libelf.so.0 when starting screen if it's not installed.
Comment by: Ranguvar on Sun, 11 Oct 2009 04:00:10 +0000
The three lines at the end of the install scriplet are unnecessary now and can cause problems apparently, please remove :)
Also, I cannot confirm libelf dependency, both by using ldd and trying removing libelf, so it should be kept out.
First Submitted: Sun, 09 Nov 2008 15:43:42 +0000
screen-git 20090616-1 : GNU Screen from GIT repository. Provides vertical splitting.
( Unsupported package: Potentally dangerous ! )
==> Edit the PKGBUILD (highly recommended for security reasons) ? [Y/n]("A" to abort)
==> ----------------------------------------------
==>n
==> screen-git dependencies:
- ncurses (already installed)
- shadow (already installed)
- git (already installed)
- automake (already installed)
- autoconf (already installed)
==> WARNING: This PKGBUILD contains install file that can be dangerous.
screen.install
==> Edit screen.install (highly recommended for security reasons) ? [Y/n] ("A" to abort)
==> ----------------------------------------------
==>y
Please add EDITOR to your environment variables
for example:
==> Edit PKGBUILD with:(replace gvim with your favorite editor)
==> Edit screen.install with:vim
==> WARNING: This PKGBUILD contains install file that can be dangerous.
screen.install
==> Edit screen.install (highly recommended for security reasons) ? [Y/n] ("A" to abort)
==> ----------------------------------------------
==>n
==> Continue the building of screen-git ? [Y/n]
==> ----------------------------------------------
==>y
==> Install or build missing dependencies for screen-git:
==> Building and installing package
mkdir: cannot create directory `/var/abs': Permission denied
==> WARNING: Unable to write in /var/abs/local/yaourtbuild/screen-git directory. Using /tmp directory
==> screen-git dependencies:
- ncurses (already installed)
- shadow (already installed)
- git (already installed)
- automake (already installed)
- autoconf (already installed)
==> Determining latest git revision...
-> Version found: 20091204
==> Making package: screen-git 20091204-1 i686 (Fri Dec 4 07:43:16 CST 2009)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
-> Found screen.pam in build dir
==> Validating source files with md5sums...
screen.pam ... Passed
==> Extracting Sources...
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting build()...
==> Connecting to GIT server....
Already up-to-date.
==> The local files are updated.
==> GIT checkout done or server timeout
==> Starting make...
autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for `config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader:
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a template without
autoheader: WARNING: `acconfig.h':
autoheader:
autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader: [Define if a function `main' is needed.])
autoheader:
autoheader: WARNING: More sophisticated templates can also be produced, see the
autoheader: WARNING: documentation.
configure: WARNING: unrecognized options: --with-sys-screenrc
this is screen version 4.1.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking for library containing strerror... none required
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gawk... gawk
checking for a BSD-compatible install... /bin/install -c
configure: checking for buggy tools...
- sh is 'GNU bash, version 4.0.35(2)-release (i686-pc-linux-gnu)'.
- sed is 'GNU sed version 4.2.1'.
checking if a system-wide socket dir should be used... yes
checking for the socket dir... (eff_uid ? "/tmp/uscreens" : "/tmp/screens")
configure: checking for MIPS...
configure: checking for Ultrix...
configure: checking for butterfly...
configure: checking for POSIX.1...
- you have a POSIX system
configure: checking for System V...
configure: checking for sequent/ptx...
configure: checking SVR4...
checking stropts.h usability... yes
checking stropts.h presence... yes
checking for stropts.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
configure: checking for Solaris 2.x...
configure: checking BSD job jontrol...
- you have jobcontrol
configure: checking setresuid...
configure: checking setreuid...
configure: checking seteuid...
configure: checking select...
configure: checking fifos...
- your fifos are usable
configure: checking for broken fifo implementation...
- your implementation is ok
configure: checking sockets...
- your sockets are usable
configure: checking socket implementation...
- you are normal
- both sockets and fifos usable. let's take sockets.
configure: checking select return value...
- select is ok
configure: checking for tgetent...
configure: checking libcurses...
- you use the terminfo database
configure: checking ospeed...
configure: checking for /dev/ptc...
configure: checking for SVR4 ptys...
checking for getpt... yes
configure: checking for ptyranges...
configure: checking default tty permissions/group...
checking for write... /usr/bin/write
checking for xterm... /usr/bin/xterm
- pty mode: 0620, group: 0
configure: checking getutent...
configure: checking ut_host...
checking utempter.h usability... no
checking utempter.h presence... no
checking for utempter.h... no
configure: checking for libutil(s)...
configure: checking getloadavg...
assuming posix signal definition
configure: checking for crypt and sec libraries...
configure: checking crypt...
configure: checking IRIX sun library...
configure: checking syslog...
configure: checking wait union...
configure: checking for termio or termios...
configure: checking getspnam...
configure: checking getttyent...
configure: checking fdwalk...
configure: checking whether memcpy/memmove/bcopy handles overlapping arguments...
checking for long file names... yes
checking for vsprintf... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for setenv... checking for nl_langinfo(CODESET)... yes
checking for library containing gethostname... none required
checking for rename... yes
checking for fchmod... yes
checking for fchown... yes
checking for strerror... yes
checking for lstat... yes
checking for _exit... yes
checking for utimes... yes
checking for vsnprintf... yes
checking for getcwd... yes
checking for setlocale... yes
checking for strftime... yes
checking for PAM support... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
configure: WARNING: unrecognized options: --with-sys-screenrc
Now please check the pathnames in the Makefile and in the user
configuration section in config.h.
Then type 'make' to make screen. Good luck.
CPP="gcc -E -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"'" srcdir=. sh ./osdef.sh
AWK=gawk CC="gcc -march=i686 -mtune=generic -O2 -pipe" srcdir=. sh ./comm.sh
gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
-march=i686 -mtune=generic -O2 -pipe screen.c
gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
-march=i686 -mtune=generic -O2 -pipe ansi.c
gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
-march=i686 -mtune=generic -O2 -pipe fileio.c
gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
-march=i686 -mtune=generic -O2 -pipe mark.c
gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
-march=i686 -mtune=generic -O2 -pipe misc.c
gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
-march=i686 -mtune=generic -O2 -pipe resize.c
gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
-march=i686 -mtune=generic -O2 -pipe socket.c
In file included from socket.c:51:
extern.h:159: error: conflicting types for 'execvpe'
/usr/include/unistd.h:585: note: previous declaration of 'execvpe' was here
make: *** [socket.o] Error 1
==> ERROR: Build Failed.
Aborting...
Error: Makepkg was unable to build screen-git package
Vertical split is ftw! What can i do to build it?yeah, i also got that message.
for vertical split you can go for screen-vs package. this is screen with the vs patch.
http://aur.archlinux.org/packages.php?ID=6006 -
Unable to exit full screen mode from any app
Hi,
I just upgraded to Mountain Lion today and I noticed something wrong. In Lion I used to be able to exit full screen mode from any app by pressing esc or clicking the exit full screen mode button on the top right corner of the screen. Now neither of those seem to work, in fact the menu bar doesn't even come up when I get the cursor to the top of the screen. Tried this on many apps, some system apps, always the same. The only way I found that works is pressing fn + ctrl + F2 (or ctrl + F2 depending on the function keys setting).
I checked the console and found this message appears whenever I go into full screen
WindowServer[79]: CGXRegisterWindowWithSystemStatusBar: window 10 already registered
Anyone having the same issue?
Any solutions found?
MacBook Pro 5,1
Processor 2,8 GHz Intel Core 2 Duo
Memory 4 GB 1067 MHz DDR3
Graphics NVIDIA GeForce 9600M GT 512 MB
Software OS X 10.8 (12A269)Thanks for replying so fast.
I tried a couple more times and now the esc key method seems to be working, maybe it the cursor focus had something to do with it not working earlier.
But I still can't get the menu bar to drop down when I get to the top of the screen.
Did a PRAM reset, but no cigar.
Do you mean reinstalling over the current installation or installing fresh and recovering from a time machine backup?
In any case I think I'll wait a little bit more before I do any of that, it really bothers me to have to reinstall the whole system to fix something as insignificant as this. It's still a little annoying though. -
Dynamically add an in memory Bitmap to a List
I'm trying to dynamically add an in memory Bitmap to a List
control. I'm trying to create a thumbnail
from a larger bmp image and display the thumbnail in the
list. The thumbnail images are being created ok
but the bitmaps are not displaying in the List control. The
code I'm using is shown below. Apparently I can't
use a collection of bitmaps in the List. Previously I had a
collection of pathnames as strings that pointed to
jpgs on disk and it displayed ok. Does anyone know how I can
get the Bitmaps to display?
<mx:List id="fileList" x="10"y="10" width="231"
height="648" rowHeight="160" columnWidth="120 enabled="true"
click="loadImage()" itemRenderer="mx.controls.Image"
dataProvider="{myProvider}"></mx:List>
public var anArray:Array = new Array();
public var myProvider:ArrayCollection = new
ArrayCollection(anArray);
var thumbnail:Bitmap = new Bitmap(new
BitmapData(thumbSize,thumbSize,true,0));
thumbnail.bitmapData.draw(bmp,matrix);
myProvider.addItem(thumbnail);without looking at what tables you are using and and how you built the query this is what I can think of:
Please write this in record processing section:
fields material/stock/req are the running variables in meaning database field names.
lv_ava is the new field that needs to be created.
data lv_stock type INSME.
data lv_req type insme.
at new material.
lv_stock = stock.
clear :lv_req, req.
end at.
lv_req = lv_req + req.
lv_ava = stock-lv_req. -
Someone else posted a similar thread, but his issue got resolved. Here's the deal.
I have the system described in my signature. The PSU is not mentioned, but it is an Antec 400W PSU that I bought specifically because it met the suggested requirements set forth in the Trouble Shooting guide (I'd list the amps, but I really don't want to open my computer up right now). Anyways, the screen draw performance is horrible, particularly in Windows Media Player 10 and at http://www.pcpitstop.com during the video test. The odd thing is that when I play games (Rainbox Six 3 Raven Shield for example) I see no problem in video performance. I just reinstalled windows, updated it, and then installed the latest 4in1s and nVidia driver (66.93) and tried it: same problem occurs. I have tried my Mushkin memory as well as some cheap SimpleTech stuff I have, and both give problems. Any suggestions? Do you think this may be a problematic board? Does any other KT880 Delta user have this problem?Quote from: drummer13 on 07-March-05, 15:53:33
https://forum-en.msi.com/index.php?action=dlattach;topic=74852.0;id=448
There is the URL to the beta bios. It is named as index.zip, but I downloaded it and it is fine. In case the .exe file doesn't work, just download the 1.8 bios file from the kt880 webpage and use it. That was the one I used.
I don't think this is a quality of memory issue. I set one up for my friend with some corsair memory in it and it did the same thing. And the beta bios here (1.9b6) fixed it and mine. I am not sure what exactly it fixes, but it does fix it. My computer was the same. good on games, bad on desktop. It's got me, but all I know is my system is a beast now.
Hope this helps... but remember, don't cry if you blow stuff up using beta anything.
I'm crying now... I recently got a KT880 with 512MB x2 Corsair PC3200 value RAM. Right now not overclocked, DDR set to SPD mode. I was using bios 1.8 and I couldn't install WinXP SP1 or SP2 with "Vlink8X" enabled in the bios. Once disable I can install everything. Even then sometimes my PC will restart itself for no apparent reason, even with onboard Gigabit and AC97 disabled. I tried bios 1.96 and now my PC reboots itself again and again during POST. How I know, the keyboard lights blink every 5 seconds or so. Anyone else experiencing this?
XP1800+ stock
MSI KT880
Corsair Value PC3200 at SPD timings
Sapphire Radeon 9800 Pro 128MB
80GB Seagate SATA with NCQ
LG DVD-DL burner
Surecom 10/100 PCI -
Import from Memory id is not working
Hi All,
In the program SAPF110V for Tcode : F110 , I have written an enhancement where when user clicks printout button then a popup will come which will ask for whether date should be printed in the check or not. for this i have used FM : POPUP_TO_CONFIRM . here i am exporting the value if user clicks no (value is 2 for NO).
exoprt statemnt written :
export l_v_answer from l_v_answer to memory ID 'ANS'.
In the driver program for check printing i am importing the value .if value = 2 then i am clearing the date that has to be printed in the check.
import stmt :
Import l_v_answer to l_v_answer from memory ID 'ANS'.
however the value is not getting imported here.
not able to find the reason why the value is not getting picked with import. please let me know the solution.
Thanks,
Preethi.called program
REPORT ZTEST7.
selection-screen begin of block b1.
parameters: a like mara-matnr.
selection-screen end of block b1.
types: begin of tp_sel_tab.
include structure zstr2.
types: end of tp_sel_tab.
data: t_sel_tab type standard table of tp_sel_tab with header line.
data: w_t_sel_tab type tp_sel_tab.
*call screen 9100.
start-of-selection.
select ernam from mara into corresponding fields of table t_sel_tab where matnr = a.
export t_sel_tab to memory id 'ZTEST7'.
loop at t_sel_tab into w_t_sel_tab.
write:/ w_t_sel_tab-ernam.
endloop.
calling program
REPORT ZTEST8.
*types: begin of tp_sel_tab.
include structure zstr2.
*types: end of tp_sel_tab.
data: begin of t_sel_tab occurs 0,
ernam like mara-ernam,
end of t_sel_tab.
data: begin of sel_tab occurs 0,
ernam like mara-ernam,
end of sel_tab.
*data: t_sel_tab type standard table of tp_sel_tab.
*types: begin of tp_sel_tab1,
ernam like mara-ernam,
end of tp_sel_tab1.
*data: sel_tab type standard table of tp_sel_tab .
data: w_sel_tab type zstr2.
submit ztest7 with a = '000000000000000939' and return.
import sel_tab = t_sel_tab from memory id 'ZTEST7'.
loop at sel_tab into w_sel_tab..
write:/ w_sel_tab-ernam.
endloop.
please reward points -
Data come from difference data source
In my saturation, my program's data are come from difference data source. For example, the program will retrieve PO balance, material consumption, future consumption and so on. In my program logic, i retrieve all of the material number, the retrieve the PO balance, material consumption... into internal table, then loop the internal table of material number and update this table from internal table of po balance, material consumption..., but i found that the program's running time is long. How to improve the performance or any suggestion for the program logic. Thanks.
Hi,
Few Guildlines:
1. program is slow mainly because Database load is too high, try to reduce it and that load can be shared by ABAP. gotrhough SE30-perfromance tuning.
Also, in Se30 u will get all most important Tips and tricks, follow it,...
2. Try to find out summary table and dont try always to get data from basic tables.
3. Try to use perfect SELECT statemetn with porper joins, which is most important in reduction of load on DB.
4. you can make ABAP part faster, following coding standard like use of Binary search.
5. Use SLIN to find out which part of program is taking too much time, try to reduce it.
Hope this will guide u.
Jogdand M B -
Amount to draw from down payment is not set in document currency
hi,
i always get the error "amount to draw from down payment is not set in document currency" when i try to update a draft of invoice with down payment.
i do the following:
1. sales order
2. down payment
3. income payment
4. delivery note
5. invoice
5.1 save as draft by di api
5.2 get draft by key
5.3 do some changes, for example change comments by di api
5.4 update draft by diapi <--- the error is thrown!
If i do this on screen everything works fine. But by sdk its not working.
System: SAP 8.8 SP00 PL20
Is there a solution for this problem?
best regards
MarkusHi Markus,
What if you update the same draft from UI instead of by diapi? Do you still get error message?
Thanks,
Gordon -
Loading ImageView with in-memory bitmap
I am new to JavaFX, and I have search all over the internet but I cannot find the answer.
My Java code is creating an in-memory bitmap image and I would like to display it in JavaFX ImageView class (without saving it to a file). ImageView can load an image from a URL, but how do I do that from a member variable in a Java class?
As an alternative, I tried to subclass SwingComponent (instead of using ImageView) and have the java.awt.Image member variable in this class. I can bind to this member variable, but now I am stuck, since I cannot get JavaFX to invoke my paintComponent repaint routine. If I could then I can use graphics drawImage in this routine.
Also, Timeline, while it is cool, does not apply to my solution since the image is generated at various times based on system events.
Which is the best approach?
Any help would be appreciated.
- ToshThank you for your answer. I also found it difficult to convert the int[] of the image to BufferedImage. I did manage to cobble together some code that does this, although, I think it is inefficient. Anyway, I am glad that I have some working code now. As an aid to others I am placing my routine to convert int array to BufferedImage. If anyone has a more efficient way, please add to this trail.
BufferedImage bimg = null;
public BufferedImage intArraytoImage(int[] buf, int w, int h) {
int[] BM = new int[]{0xff0000, 0xff00, 0xff}; // I don't have alpha channel... {0xff0000, 0xff00, 0xff, 0xff000000};
SinglePixelPackedSampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_INT, w, h, BM);
DataBufferInt db = new DataBufferInt(buf, w * h, 0);
Point p = new Point(0, 0);
WritableRaster raster = null;
try {
raster = Raster.createWritableRaster(sm, db, p);
ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
int[] nBits = {24};
ColorModel cm = new ComponentColorModel(cs, nBits, false, true, Transparency.OPAQUE, DataBuffer.TYPE_BYTE);
bimg = new BufferedImage(w, h, 1); // 1 = TYPE_INT_RGB
bimg.setData(raster);
} catch (Exception e) {
System.out.println("exception in creating BufferedImage");
e.printStackTrace();
return bimg;
- Tosh
fixed typo -
in the company I´m working for it´s not possible to install add-ons by the Users . That´s what I´m going to change.
We use Firefox ESR 17 and Window 7.
I want to make add-ons available for everybody by integrating an internal central service. That is possible by customizing the "extension.webservice.discoverURL" to the server I´m talking about. The Problem is that nobody should be able to install add-ons from any other source, for example addons.mozilla.org, local media,...
Do you have an idea, how this problem can be solved?
Maybe there is a possibility by using the lockPref "xpiinstall.enabled false" in conjunction with a whitelist defining my Server?Does any of this or similar blogs by the same author help
*http://mike.kaply.com/2012/07/03/customizing-firefox-blocking-add-ons/
Although with many hacks there could be some sort of workaround that advanced users may employ when attempting to circumvent the measures, such as the ability to use Firefox in safe-mode and then install add-ons, or even run a browser from a memory stick.
You may well get a better answer on some other forum. This mozillazine forum deals with some coding issues, not sure but they may consider your sort of question on topic.
* http://forums.mozillazine.org/viewforum.php?f=25 -
IMPORT ... FROM MEMORY
Hi,
I would like to know if there is a way to <b>generically</b> import an object stored into memory.
Indeed, IMPORT.. FROM MEMORY doesn't seem to accept any reference of field-symbols or anything of that sort.
The class CL_ABAP_EXPIMP_MEM looks like it only provides description of the content.
Thanks in advance.
Best regards,
GuillaumeHai
Check the following Code
IMPORT - Get data
Variants
1. IMPORT f itab FROM MEMORY.
2. IMPORT f itab FROM DATABASE dbtab(ar) ID key.
3. IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
4. IMPORT f itab FROM DATASET dsn(ar) ID key.
Variant 1
IMPORT f itab FROM MEMORY.
Additions
1. ... TO g (for each field f to be imported)
2. ... ID key
Effect
Imports data objects (fields or tables) from the ABAP/4 memory (see EXPORT ). Reads in all data without an ID that was exported to memory with "EXPORT ... TO MEMORY." . In contrast to the variant IMPORT FROM DATABASE , it does not check that the structure matches in EXPORT and IMPORT .
The return code value is set as follows:
SY-SUBRC = 0 The data objects were successfully imported.
SY_SUBRC = 4 The data objects could not be imported, probably
because the ABAP/4 memory was empty.
The contents of all objects remain unchanged.
Addition 1
... TO g (for each field f to be imported)
Effect
Takes the field contents stored under f from the global ABAP/4 memory and places them in the field g .
Addition 2
... ID key
Effect
Imports only data stored in ABAP/4 memory under the ID key .
The return code value is set as follows:
SY-SUBRC = 0 The data objects were successfully imported.
SY_SUBRC = 4 The data objects could not be imported, probably
because an incorrect ID was used.
The contents of all objects remain unchanged.
Variant 2
IMPORT f itab FROM DATABASE dbtab(ar) ID key.
Additions
1. ... TO g (for each field f to be imported)
2. ... MAJOR-ID maid (instead of ID key )
3. ... MINOR-ID miid (together with MAJOR-ID maid )
4. ... CLIENT h (after dbtab(ar) )
5. ... USING form
Effect
Imports data objects (fields, field strings or internal tables) with the ID key from the area ar of the database dbtab (see also EXPORT )
The return code value is set as follows:
SY-SUBRC = 0 The data objects were successfully imported.
SY_SUBRC = 4 The data objects could not be imported, probably
because an incorrect ID was used.
The contents of all objects remain unchanged.
Example
Import two fields and an internal table:
TABLES INDX.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4), F2 TYPE P,
BEGIN OF TAB3 OCCURS 10,
CONT(4),
END OF TAB3.
INDXKEY = 'INDXKEY'.
IMPORT F1 F2 TAB3 FROM DATABASE INDX(ST) ID INDXKEY.
Notes
The structure of fields, field strings and internal tables to be imported must match the structure of the objects exported to the dataset. In addition, the objects must be imported under the same name used to export them. If this is not the case, either a runtime error occurs or no import takes place.
Exception: You can lengthen or shorten the last field if it is of type CHAR , or add/omit CHAR fields at the end of the structure.
Addition 1
... TO g (for each field f to be imported)
Effect
Takes the field contents stored under the name f from the database and places them in g .
Addition 2
... MAJOR-ID maid (instead of ID key )
Addition 3
... MINOR-ID miid (together with MAJOR-ID maid )
Effect
Searches for a record with an ID that matches maid in the first part (length of maid ) and - if MINOR-ID miid is also specified - is greater than or equal to miid in the second part.
Addition 4
... CLIENT h (after dbtab(ar) )
Effect
Takes the data from the client h (only with client-specific import/export databases).
Example
TABLES INDX.
DATA F1.
IMPORT F1 FROM DATABASE INDX(AR) CLIENT '002' ID 'TEST'.
Addition 5
... USING form
Effect
Does not read the data from the database. Instead, calls the FORM routine form for each record read from the database without this addition. This routine can take the data key of the data to be retrieved from the database table work area and write the retrieved data to this work area schreiben; it therefore has no parameters.
Note
Runtime errors
Depending on the operands or the datsets to be imported, various runtime errors may occur.
Variant 3
IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
Additions
1. ... CLIENT h (after dbtab(ar) )
Effect
Imports an object directory stored under the specified ID with EXPORT into the table itab .
The return code value is set as follows:
SY-SUBRC = 0 The directory was successfully imported.
SY_SUBRC = 4 The directory could not be imported, probably because an incorrect ID was used.
The internal table itab must have the same structure as the Dictionary structure CDIR (INCLUDE STRUCTURE ).
Addition 1
... CLIENT h (after dbtab(ar) )
Effect
Takes data from the client h (only with client-specific import/export databases).
Example
Directory of a cluster consisting of two fields and an internal table:
TABLES INDX.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4), F2 TYPE P,
BEGIN OF TAB3 OCCURS 10,
CONT(4),
END OF TAB3,
BEGIN OF DIRTAB OCCURS 10.
INCLUDE STRUCTURE CDIR.
DATA END OF DIRTAB.
INDXKEY = 'INDXKEY'.
EXPORT F1 F2 TAB3 TO
DATABASE INDX(ST) ID INDXKEY. " TAB3 has 17 entries
IMPORT DIRECTORY INTO DIRTAB FROM DATABASE INDX(ST) ID INDXKEY.
Then, the table DIRTAB contains the following:
NAME OTYPE FTYPE TFILL FLENG
F1 F C 0 4
F2 F P 0 8
TAB3 T C 17 4
The meaning of the individual fields is as follows:
NAME : Name of stored object OTYPE : Object type ( F : Field, R : Field string / Dictionary structure, T : Internal table) FTYPE : Field type ( C : Character, P : Packed, ...)
Field strings and internal tables have the type C. TFILL : Number of internal table lines filled FLENG : Length of field in bytes
With internal tables: Length of header line.
Variant 4
IMPORT f itab ... FROM DATASET dsn(ar) ID key.
Note
This variant is not to be used at present.
IMPORT DYNPRO - Import a screen
Basic form
IMPORT DYNPRO h f e m ID id.
Effect
Imports the screen specified in the field id . Loads the screen information into the structure h (screen header, structure D020S ) and into the internal tables f (field list, structure D021S ), e (flow logic, structure D022S ) and m (matchcode information, structure D023S ).
The return code value is set as follows:
SY-SUBRC = 0 The screen was successfully imported.
SY_SUBRC = 4 The screen does not exist.
Thanks & regards
Sreeni
Maybe you are looking for
-
ITunes won't open after upgrade. Help!!!!
I upgraded to 7.0.2 and now my iTunes won't open at all. No error message. Nothing. When I click on it, it seems like something is happening with hourglass thing going but nothing happens. No error message.....no nothing. I looked under Processes in
-
Is it possible to export a Book from Aperture 3 to iPhoto?
I shot a wedding for a friend and made a layout of a book on Aperture 3. Printed a few books which I thought were beautiful. I was wondering if it would be possible to export this book from Aperture (with the layout and photos intact) as a file (edit
-
Database link Oracle to MySql Error [Microsoft][ODBC Driver Manager]
Dear all: I need your help, I want to access mysql database from oracle 11g r2. When I try to connect mysql database from oracle database I'm getting the error shown below, kindly help your help will be appreciated, thanks in advance When I excute: s
-
How do I create a master page when using Project7 templates?
Hi, I am using P7 templates to easily create a nice website. However, I would like to create for example the main menu only once and have it re-used on every page or at least every page I want to. I think this is a called a masterpage (?) where you c
-
Handling a sync call in a BPM??
Hi there, I have WS client <> XI <> WS Server scenario, where WS client and WS server, bot are BPMs designed under different business systems. 1.Is it possible to expose a web-service using an abstract interface? or the interface has to be only outbo