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)
Tracking
()
RESOLVED
FIXED
People
(Reporter: hsumen, Assigned: pavlov)
References
Details
(Whiteboard: cairo)
Attachments
(1 file)
|
3.47 KB,
patch
|
vlad
:
review+
moco
:
review+
|
Details | Diff | Splinter Review |
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.
Updated•20 years ago
|
Whiteboard: cairo
Updated•20 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 1•20 years ago
|
||
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.
Comment 4•20 years ago
|
||
This WFM on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060331 Firefox/1.6a1 ID:2006033104
Comment 5•20 years ago
|
||
Currently "Set As Desktop Background..." doesn't do anything because of Bug 332484
These bug are probably related.
Comment 6•20 years ago
|
||
(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.
| Assignee | ||
Comment 7•20 years ago
|
||
this fixes it
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+
| Assignee | ||
Comment 9•20 years ago
|
||
eh, I like my loop better.
Comment 10•20 years ago
|
||
Comment on attachment 227162 [details] [diff] [review]
fix
r=sspitzer, looks reasonable to me.
Comment 11•20 years ago
|
||
Comment on attachment 227162 [details] [diff] [review]
fix
r=sspitzer
Attachment #227162 -
Flags: review+
| Assignee | ||
Updated•20 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 12•20 years ago
|
||
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.
Description
•