How to get BufferedImage to treat zero in the same way as MemoryImageSource
Hi!
I was wondering if there is a way for BufferedImage to treat the value zero, i.e. 0, the same way as MemoryImageSource. After some testing I have found out that if the integer array that is used by MemoryImageSource contains a zero pixel value, it is treated as no value and the given background color to drawImage is used. When using BufferedImage, with type TYPE_INT_RGB, the zero value is treated as black.
The problem is that I need to replace my MemoryImageSource instance with a BufferedImage to handle dynamic update better and I do not want to redesign the whole pixel array. Is there a way to get BufferedImage to treat 0 value pixels the same way as MemoryImageSource, i.e. treat them as no value and use the background color.
Would really appreciate some help!
Best regards
Lars
Have you tried using an ARGB image type instead of RGB? Then you can set the alpha of pixels you want to be transparent to zero.
Similar Messages
-
How do i get a still image to fade the same way and at the same time as a video?
I have a video stacked on top of a still image. When i add a transition, the still turns to a black screen while the video fades in accordance to the transition. How do i get the still image to fade the same way and at the same time as the video?
I do. I've applied it to both the still image and the video. Say i used the lens flare transition. If i apply it to both the video and the still image, the video will dissolve in to the next frame, but the still image will go to a black screen and then jump to the next frame. Its almost as if i inserted a black frame instead of a transition, but only for 2 seconds. Below is kind of a peek what it looks like.
-
How to get most recent consecutive records with the same value
Hi,
Can someone please help me to solve my problem?
Below is my table
Prod_Code-----Purchase_date---Inv_number-------Inv_amt
MS_AV16850------18/01/2005-----------6575947----------------7.93
MS_AV16850------22/07/2005-----------7034012----------------51.82
MS_AV16850------04/01/2006-----------8719618----------------51.82
MS_AV16850------20/06/2006-----------9515864----------------104.69
MS_AV16850------16/04/2007-----------10353759----------------189.29
MS_AV16850------30/05/2007-----------10689899----------------189.29
MS_AV16850------06/01/2008-----------1653821----------------65.49
MS_AV16850------22/02/2009-----------10866311----------------189.29
I want my query to show the rows that has most recent purchase dates with same amount in consecutive purchase date.
So from the table above, the query should display:
Prod_Code-----Purchase_date---Inv_number-------Inv_amt
MS_AV16850------16/04/2007-----------10353759----------------189.29
MS_AV16850------30/05/2007-----------10689899----------------189.29
It should not get
MS_AV16850------16/04/2007-----------10353759----------------189.29
MS_AV16850------30/05/2007-----------10689899----------------189.29
MS_AV16850------22/02/2009-----------10866311----------------189.29
because inv_number 10866311 has a prvevious inv_amount of 65.49.
and not get this
MS_AV16850------22/07/2005-----------7034012----------------51.82
MS_AV16850------04/01/2006-----------8719618----------------51.82
because they are not the most recent purchase date even if they have the same inv_amount.
Thanks in advance.Hi,
You're right; thanks for catching my mistake.
I changed the WHERE clause of the main query (including subquery there) to deal with that situation:
WITH got_grp AS
SELECT x.*
, ROW_NUMBER () OVER ( ORDER BY purchase_date )
- ROW_NUMBER () OVER ( PARTITION BY inv_amt
ORDER BY purchase_date ) AS grp
-- , ROW_NUMBER () OVER ( ORDER BY purchase_date ) AS r1
-- , ROW_NUMBER () OVER ( PARTITION BY inv_amt
-- ORDER BY purchase_date ) AS r2
FROM table_x x
SELECT * -- Or list all columns except grp
FROM got_grp
WHERE (inv_amt, grp) IN (
SELECT MAX (inv_amt) KEEP (DENSE_RANK LAST ORDER BY MAX (purchase_date))
, MAX (MAX (grp))
FROM got_grp
GROUP BY grp
, inv_amt
HAVING COUNT (*) > 1
;Thanks, too, for posting the sample data. Apparantly, you're more interested in solving this problem than OP is.
Edited by: Frank Kulash on Nov 22, 2010 1:36 PM
The r1 and r2 columns are not needed for the solution. You may want to display them, just to help see how the query works. -
How to get a form to appear on the same page when a button is clicked?
Hi,
I have a report on a page with a create button. When a user clicks the create button, a form should appear on another region in the same page....how do i go about doing this?
I know how to do this if the form is on a different page, but i'd like the form to appear on the same page as the report and only when the button is clicked.
Thanks.Hi,
I did the following, but it didnt work....
1) Created a hidden item on the page, and in the Default Value field, I set the value to N.
2) Created a button in the report with the following values under "Optional URL Redirect":
Target is a: Page in this application
Page: 4
Set these items: P1_SHOW_FORM
With these values: Y
3) Created a form of HTML text type with the following values under "Conditional Display":
Condition Type: Request=Expression 1
Expression 1: P1_SHOW_FORM='Y'
What have I done wrong or have i missed something?
Thanks. -
My iPhone has an optio for a Vietnamese keyboard that works very well but I can't get the same results on my Mac Book Pro. Why is that? Am I typing some thing wrong? There are no pop-ups when I use the Vietnamese keyboard on my laptop or desktop.
MacBook Pro
https://discussions.apple.com/community/notebooks/macbook_pro
https://discussions.apple.com/community/mac_os?view=discussions
http://www.apple.com/support/macbookpro
http://www.apple.com/support/iphone -
How to get context of another thread in the same process
getcontext() gives you the context of the calling thread. Is there any way to get the context of a different thread?
MengEvery statement that writes to the log must be synchronized so that writing of multiple applications doens't cause a deadlock !!
-
How to get BufferedImage of a JPanel
Can anyone tell me : how to get BufferedImage of a JPanel
I've done something like this:
import java.awt.Graphics;
import java.awt.LayoutManager;
import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.InputStream;
import java.io.FileInputStream;
import javax.swing.JPanel;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageDecoder;
* @author Martin Breton
public class JBackgroundImagePanel extends JPanel {
private BufferedImage mImage = null;
private InputStream mImageStream = null;
public String mImageFilename = null;
public JBackgroundImagePanel( String ImageFilename ) {
super();
mImageFilename = ImageFilename;
initialize();
public JBackgroundImagePanel( BufferedImage ImageFilename ) {
super();
mImage = ImageFilename;
initialize();
public JBackgroundImagePanel( InputStream ImageStream ) {
super();
mImageStream= ImageStream;
initialize();
private void initialize() {
if(mImage == null)
try {
ClassLoader Loader = this.getClass().getClassLoader();
if( mImageStream == null )
mImageStream = Loader.getResourceAsStream(mImageFilename);
if( mImageStream == null )
mImageStream = new FileInputStream( mImageFilename );
JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder( mImageStream );
mImage = decoder.decodeAsBufferedImage();
mImageStream.close();
catch(Exception e){
System.out.print("Image could not be loaded in JBackgroundImagePanel.");
this.setSize(mImage.getWidth(),mImage.getHeight());
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.drawImage(mImage, 0, 0, null);
}Hope this helps.
proxi -
How do i get my team to all see the same say, ID, document using the cloud?
how do i get my team to all see the same say, ID, document using the cloud?
Adobe Max was a smoke and mirror show and they demonstrated "Folder Sharing" so we bought into it. Myself and 7 of my clients. After the Max show they turned it off like nobody would notice. Two weeks after they stopped the folder sharing feature they put a little notice that they had did this. Nice how they treat their loyal customers. Every month they charged us an extra $20 over a single account without the folder sharing. What good is "team work" if you can't share a folder of files. Sharing a single file at a time is a waste of time.
After a year still no folder sharing but the same old story of "soon". Adobe is using the extra money they are "stealing" from paying clients to pay for this development. We are being forced to pay the extra money again for another year as there is no way to downgrade to a single user account. Adobe likes to use this as an excuse to continue to rob and steal from loyal user that have no choice but to deal with these crooks.
My only suggestion is for new users not to buy the team account package. There marketing material is filled with misleading statements that gives the potential new customer the impression that they can work in teams, as if a team can work sharing single files. This is a sign that Adobe is about the cash grab and not about the quality of software and the end user experience. -
How to get my macbook to connect to the Apple TV?
How to get my macbook to connect to the Apple TV in a strange apartment? I am housesitting for someone for a few months. They mentioned that i would be able to use their Apple TV to play stuff from my macbook. I am using their basic wifi in the apt, which works fine on my macbook and iphone, but see no Apple TV icon appearing on macbook screen, nor any connection happening. (nor is there anything connection w my iPhone). What gives? How can I establish a connection?
See
http://support.apple.com/kb/ts4215 -
How to get rid of unassigned values in the report
hai to all,
here is the issue,
while running a report(sales per country), iam getting the data,after that when i drill down on <u><b>sales document number</b></u> iam getting some unassigned data, with Sales document number as #, and some value in the keyfigure.what is the reason behind this?
Here is another issue that i want to find all the sales documents which have the value # in the report?, is it possible? the same case with <u><b>Customer country</b></u>, on the same report.
pl anyone help me
br
venkat/shyamHi Shyam.
Regarding the first issue: Well, you've loaded some data records into your cube where the "Sales Doc Field" is empty. Did you load through PSA? The best way to scan your PSA (I believe) is to find the underlying table and have a look at it via SE16. In this way you don't have to scan through every data single package. This can be done via "display data flow" from your cube and switch on technical names. There you have it. (It's called /BIC/B00...etcetc you might have to add i few zeroes though when you enter it into SE16). Get request ID from "Infocube Managment". In SE16 seelction screen use F2 to set the "sales Doc No." field even to blank.
Second issue is a bit easier: in your query (or a working copy of your query) restrict on "Sales Doc No" or "Customer Coutry" to only include value "#". In the same way you can remove the unassigned values be excluding value "#".
Hope this works for you.
Chears, Jørn -
How to get latest record on top of the result list
Hi Gurus,
How to get latest record on top of the result list when you open the record.
saved data method in BT120H_CPL of OverView page and result list in ICCMP_INBOX.
Regards,
RaviHi
Try sort descending by on fileld "changed at ".
manipulate the sort depends on your requirement
Regards
Logu -
How do I get IE 11 to open in the same window on the task bar?
How do I get IE 11 to open in the same spot on my task bar. i.e. IE 11 is on my task bar. When I open it, it opens in a new place on the end of the task bar. Microsoft Outlook, Windows Explorer, Quicken, Adobe, etc,, all on the task bar open
right at there location on the task bar; not in a new place at the end of the task bar.
How do I get IE 11, Windows 7, 64 bit to open at the same place as the IE icon???
ThanksHi,
Seems a strange issue, How about un-pin IE from the taskbar, then re-pin it to the taskbar for a test?
If doesn't work, I suggest you turn off IE 11 in "Turn Windows Features on or off", reboot PC, then re-turn on, check the result again.
Regards
Yolanda Zhu
TechNet Community Support -
How do I get name in Mail to be the same as Address book?
Just wondering if there was a way for the name that shows up when I get an e-mail to be the same as the name I have on that person's contact card in Address book?
For example say I have a Contact card for someone named Alexander, but in Address book I just have them listed as Alex. But every time I get an e-mail from them it comes in as Alexander (which I assume happens cause that's how they have filled in their information on their e-mail account) But I just want the e-mail to show up as coming from Alex. Does anyone know if you can do this?
Thanks
-G
Message was edited by: thisisme19That's what I thought.... Although when I log on to Mobile Me through the internet the sender's name there appears just like it does in my address book, so I thought there would be a way to set it in mail.
-
How can I get rid of multiple pictures at the same time?
how can I get rid of multiple pictures at the same time?
Adobe Bridge, lightroom and your file browser (windows explorer or Mac Finder) can select multiple pictures at once and then delete. If you are looking for more than that for information, you will need to be more specific at what your doing, what OS you have, and version of software your using. If necessary post screen shots so we can see what your doing. The more information we have the more detailed of an explaination can can give back to you.
-
How do I get 2 layers to move at the same time?
How do you get 2 layers to move at the same time?
Thanks for the help folks, sorry I've been away.
I'd love help with the problem of why I only one track seems to accept clips to play. When I drag them to other tracks or create a track by dragging the clips are grayed out and won't play, but if I drag them to the one track where they're blue they play.
Maybe you are looking for
-
We bough to Apple Watch, sport and watch series for me and my wife. Everything works fine, but no digital touch. We both in friends (and we add and removed each other few times already), we both have this finger icon, but nothing we draw or tap is no
-
Hi I recently moved my itunes to a new computer by using a external hard drive. However my itunes music is not all playable. over 4000 songs have a ! mark and when tried to be played or copied to ipod or iphone, it says that this song cannot be foun
-
For loop prob - PLEASE HELP!
I am having problems with a for loop. This for loop is nested within some other for loop. the problem I'm having is that the for loop executes once and then exits to execute the outer for loop. my initial reaction was that my condition (in the for lo
-
Belated costs during a make-to-order/sales order controlling process
Hello Experts, We implemented a make-to-order process where we collect actual costs of a repackaging process. The cost object of that process order is the sales order item (VBP, Vertriebsbelegposition). So far that cost collection works absolutely fi
-
Persistent Ozone Plug-In Problem
I have been browsing a number of different discussion boards and understand that a lot of people have had Motion quit unexpectedly as a result of a problem that "may have been caused by the Ozone plug-in." I have tried a number of the troubleshooting