Closed Bug 328354 Opened 20 years ago Closed 20 years ago

"Set As Desktop Background..." is upside down and has inverted colors.

Categories

(Core :: Graphics, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: hsumen, Assigned: pavlov)

References

Details

(Whiteboard: cairo)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060223 Firefox/1.6a1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060223 Firefox/1.6a1 see summary Reproducible: Always Steps to Reproduce: 1.Open an image file in the browser. 2.right-click, choose "Set As Desktop Background..." 3. Actual Results: Colors are inverted, image is upside down.
Whiteboard: cairo
Status: UNCONFIRMED → NEW
Ever confirmed: true
is this a regression from bug 327580 (wild guess) ?
This WFM in the latest respin, fixed?... Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060224 Firefox/1.6a1 ID:2006022408
Sorry, same build ID for cairo and non-cairo and I got confused, I still see this.
This WFM on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060331 Firefox/1.6a1 ID:2006033104
Currently "Set As Desktop Background..." doesn't do anything because of Bug 332484 These bug are probably related.
(In reply to comment #5) > Currently "Set As Desktop Background..." doesn't do anything because of Bug > 332484 > These bug are probably related. > I doubt they are related because previously the desktop preview used to show the image upside down and with the wrong colors. It no longer does, just now the background never actually gets set. I think this bug might be fixed. But that can not be verified since the entire "set as desktop background" functionality now appears to be hosed.
Attached patch fixSplinter Review
this fixes it
Assignee: nobody → pavlov
Status: NEW → ASSIGNED
Attachment #227162 - Flags: review?(vladimir)
Comment on attachment 227162 [details] [diff] [review] fix This looks fine, except I'd try to simplify this loop some.. >+#else >+ // write out the image data backwards because the desktop won't >+ // show bitmaps with negative heights for top-to-bottom >+ PRUint32 i = length; >+ do { >+ i -= bpr; >+ >+ stream->Write(((const char*)bits) + i, bpr, &written); >+ if (written == bpr) { >+ rv = NS_OK; >+ } else { >+ rv = NS_ERROR_FAILURE; >+ break; >+ } >+ } while (i != 0); >+#endif maybe something like if (bpr * num_rows > length) return error; int left; for (i = num_rows; i > 0; i--) { void *row = bits + (i-1)*bpr; left = bpr; while (left != 0) { stream->Write(row, bpr, &written); left -= written; } } and handle Write() returning an error..
Attachment #227162 - Flags: review?(vladimir) → review+
eh, I like my loop better.
Comment on attachment 227162 [details] [diff] [review] fix r=sspitzer, looks reasonable to me.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Blocks: 332484
You could've moved the rv = NS_OK outside the loop.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: